« 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.
http://ubuntuforums.org/showthread.php?p=7677302#post7677302

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

http://ubuntuforums.org/showthread.php?t=845951
http://objectmix.com/apache/657556-start-up-problems-could-not-bind-address.html
http://ubuntuforums.org/archive/index.php/t-255556.html

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
http://ubuntuforums.org/showthread.php?t=441019&page=3

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

Comments

Login to leave a comment. Create a new account.