View Full Version : [kubuntu] Drupal 6 Clean URL issues!

April 9th, 2010, 08:47 AM
I have installed drupal 6 on my system. However the clean urls are not enabled. I googled around to find out that I have to do the below:-

Ensure that mod_rewrite is enabled for Apache 2:
% sudo a2enmod rewrite
Edit Apache 2 configuration to allow Drupal's .htaccess file to be used. In file /etc/apache2/sites-enabled/000-default, inside the tag Directory /var/www/, replace the line
AllowOverride none
AllowOverride All
Restart Apache 2:
% sudo /etc/init.d/apache2 restart

But after modifying the file(000-default), I am unable to save it as it says I dont have permissions. Am quite new to the entire linux thing, so please helpp!

April 9th, 2010, 10:11 AM
you need to edit the file as root.
This file /etc/apache2/sites-enabled/000-default is a symlink to this file /etc/apache2/sites-available/default
I would edit the latter directly.
sudo nano /etc/apache2/sites-available/default

Also if you only need rewriterules tou should only AllowOverride FileInfo instead of AllowOverride All
The Apache docs has info on which directives are needed for what. http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride

I think you should at least Allowoverride FileInfo Options=Indexes,FollowSymLinks to use drupals .htaccess directives.

April 9th, 2010, 11:20 AM
sudo nano /etc/apache2/sites-available/default

Thanks ! but what would the above command do

April 9th, 2010, 11:58 AM
sudo nano /etc/apache2/sites-available/default
Will open /etc/apache2/sites-available/default with the nano (https://help.ubuntu.com/community/Nano) editor under root privileges. It wont change anything by it self, just open the file.

If you open a terminal and use ls -l /etc/apache2/sites-available it will display details about file ownership. If a file is owned by root and is not world-writable you will need to use sudo to change it.
Read about terminal commands here https://help.ubuntu.com/community/UsingTheTerminal#File%20&%20Directory%20Commands
And about permissions here https://help.ubuntu.com/community/FilePermissions

If you prefer to edit files in a gui application you should use gksudo instead of sudo

Finally you should use service to start/stop dæmons.
sudo service apache2 restart