I just installed Drupal 6.20 on Ubuntu 10.04. Everything seems working fine except the clean URL. Please bear with me I'm new to Linux and Drupal. This is my environment:
- Drupal 6.20 on Ubuntu 10.04
- Apache 2 and MySQL, phpmyadmin installed and working fine

Steps taken to make clean URL working:
- sudo a2enmod rewrite
- confirmed with apache2ctl -M command and it's showing rewrite_module is loaded
- added

<Directory /var/www/>
AllowOverride All
</Directory>

to /etc/apache2/apache2.conf file (the original file does not have this entry)
- un-commented the following entries in .htaccess file

RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
RewriteBase /

What else do I need to do to make clean URL to work? I thought I did everything, but it seems something is still missing!!! When I tried to enter a clean URL as suggested by others (http://localhost/admin/settings/clean-urls/), I got page not found error. Right now I have clean URL page grayed out.

Comments

drclaw’s picture

I know this is probably a dumb question, but you do have clean URLs turned on in drupal, right?

Also, is drupal installed in /var/www/drupal? I think you still need the .htaccess file in there...

michaelbr’s picture

How do I turn on the clean URL if it's grayed out?
Yes, that's correct, drupal is installed in /var/www/drupal. Are you saying that I need .htaccess in this dir instead of in /var/www? It was there and it wasn't working, so I moved it one level up.

nevets’s picture

The .htaccess file needs to be in your sites root directory (the one with index.php), in your case /var/www/drupal

michaelbr’s picture

I moved .htaccess to /var/www/drupal, still the clean URL is grayed out. Any other thing I missed?

nevets’s picture

michaelbr’s picture

I believe I followed all the steps in that posting, but still clean URL is still grayed out. 2 years ago I set up a test environment in XP, followed the instructions, and it worked, but not this time with Ubuntu.