Ubuntu/Kubuntu and mod_rewrite

I just spent a couple of days, on and off, fiddling with my apache setup on a kubuntu box. I had a site with some very weird and scary rewrite rules which I needed to do some development work with and I just could not get the site to work!

The solution was very simple and I found the answer in this post about ubuntu and apache. Basically, AllowOverride is set to None for both / and /var/www/ by default on ubuntu, which is nice and secure but it caught me out on this occasion. Change the settings to AllowOverride All and create a symlink in mods-enabled to mods-available/rewrite.conf and restart apache – everything should then start playing nicely.

4 thoughts on “Ubuntu/Kubuntu and mod_rewrite

  1. I must say out of all the distros I have played with Ubuntu has the strangest Apache setup I have ever seen. I am assuming this is based of a Debian default configuration but have never really played with Debian.
    Having said that OpenSUSE also has a strange way of enabling mod_rewrite.
    Ubuntu’s PHP setup was terrible until a couple of releases ago. All module configs were shoved in the php.ini, kind of defeated the purpose of them being modules.
    Although I’m not happy with several decisions Ubuntu has made with their server software.
    (/rant)

  2. LinuxJedi: I’m glad its not just me that finds ubuntu’s apache setup a bit weird. Although, now I’ve been using it for a while, it is definitely growing on me and is a good configuration I think … I didn’t start until feisty though and I’ve heard scary things about earlier versions

  3. Ahh thankyou so much! I was trying to get this working for days. I never though to google for a kubuntu specific problem!! (untill now ofcourse)

  4. rek: You’re welcome. I usually google with ubuntu/kubuntu as a keyword, if only because there is a lot of support available for these distros. Glad you got your problem sorted :)

Leave a Reply

Please use [code] and [/code] around any source code you wish to share.

This site uses Akismet to reduce spam. Learn how your comment data is processed.