« Adding image css to style.css in Drupal 6 | Main | GLEON recap »

October 06, 2009

Enable clean URLs in Drupal 6

Here is how I enabled clean URLs on Drupal6/Ubuntu 9.04:

This site held the key.

Edited settings.php:
$ sudo gedit /etc/drupal/6/sites/default/settings.php &
Added the following:
$base_url = 'http://localhost/drupal6';

Change .htaccess:
$ sudo gedit /usr/share/drupal6/.htaccess &
Added this line:
RewriteBase /drupal6

Change 000-default following this site:
$ sudo gedit /etc/apache2/sites-enabled/000-default &

< Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
#AllowOverride None
AllowOverride All
Order allow,deny
allow from all
< /Directory>

Note: I added a space between "< Directory" because, as html, the Directory lines disappear.

Then do this:

$ sudo a2enmod rewrite
$ sudo /etc/init.d/apache2 force-reload
$ sudo /etc/init.d/apache2 restart

See below the fold for miscellaneous notes I accrued during this process.

Here are some potentially useful sites:

This one addresses Clean URLs on Ubuntu but an error that arises (see following) gets in the way.

For this error:
httpd: Could not reliably determine the server's fully qualified domain name, using for ServerName
(13)Permission denied: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs


To see what ports are being listened on:
$ sudo netstat -anp | grep '^tcp.*LISTEN'

To see apach version information and file locations:
$ apache2 -v
$ apache2 -V

I added "ServerName localhost" to:
$ sudo gedit /etc/apache2/httpd.conf &
$ sudo /etc/init.d/apache2 restart

and the error "Could not reliably determine..." disappears. Note I was using this site.

Changes /etc/apache2/conf.d to include this:

Alias /sev /etc/drupal/6/sites/sev

Options Indexes +FollowSymLinks
AllowOverride All
order allow,deny
allow from all

and the Options permission directive goes away but I still don't have a website.

Posted by kkwaiser at October 6, 2009 04:45 PM


Login to leave a comment. Create a new account.