In this tutorial I will explain how to enable Drupal Clean URL support on a CentOS / RedHat Linux server.
Before making any change in Apache configuration file, we will first make a backup of the Apache configuration file. Login as root to your server via SSH and run below commands:
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd-default.conf
This will make a copy of Apache configuration file and save as httpd-default.conf
Enable mod_rewrite Apache module on your server. Open Apache configuration file in nano editor
Search following line in this file
LoadModule rewrite_module modules/mod_rewrite.so
Make sure there is no # sign in the beginning of this line. If there is # sign in the beginning of this line, just delete # sign.
In section <Directory “/var/www/html”> find
Change this to:
Save this file: Ctrl + O
Exit nano editor: Ctrl + X
Your VPS / Server is now configured to support Drupal Clean URL.