Kurt Jarchow's Blog

January 8, 2009

Drupal Clean URL Linux set up, Apache2

Filed under: Uncategorized — Kurt Jarchow @ 8:29 am

I have my drupal project (version 6)  sitting on a Windows XP box, running on top of IIS but  I needed to use ClearnURLs.  So, to Linux here I come.  I decided to use Ubuntu, but I kind of wish I used Fedora.  The MySQL client tools don’t seem to have a release for Ubuntu and downloading the Fedora version didn’t work.  I always thought Linux application could run on any flavor of Linux… but I’m off topic.

To get CleanURLs to work, you’ll need to install mod_rewrite (rewrite_module), which is pretty easy:

sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
apache2ctl -M  (make sure the Module is installed, look for rewrite_module)

Edit the file /etc/apache2/sites-available/default

Find the following:

Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

and change it to:

Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all

Restart Apache:

sudo /etc/init.d/apache2 restart

Now go to Drupal.  If you go to modules>Clean Urls (make sure the Path module is loaded) you should see 2 radio buttons and a confirmation message below saying you’re able to use CleanUrls.  Flick the switch.

I really recommend installing the pathauto module if your looking for some real functionality.  You can get rid of that /node/ uselessness in the url and make some good human and SEO friendly urls.

Leave a comment if you get stuck.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress

Bad Behavior has blocked 90 access attempts in the last 7 days.