Rumblings from the keyboard of Pete Eveleigh,
a web designer and developer based in Gloucester, UK

Enabling htaccess under OSX Server 10.3

Posted: May 24th, 2007 | Author: | Filed under: Vintage | Tags: , , , | Comments Off

I use an Xserve as a testing/development server in house and it’s set up with a few virtual servers that I configured through the Admin Server tool under OSX Server. However a few of these dev sites require .htaccess files to handle some URL rewriting etc. I had problems getting .htaccess to work.

Searching online yielded some clues but my /etc/httpd/httpd.conf file looked different to all the examples I found.

I’m only slightly familiar with Apache config files too so it was a little confusing.

I discovered that the config was split up. Instead of editing /etc/httpd/httpd.conf I had to do the following:

  1. Using the OSX Server Admin interface I disabled the module mod_auth_apple and instead enabled mod_auth using the following pathnames:
    • /usr/libexec/httpd/mod_auth.so
    • mod_auth.c

    You can possibly do this in the config file, but I chose the Server Admin tool to stay safe.

  2. The docs say to edit /etc/httpd/httpd.conf but I couldn’t find the right bits in there. Instead I found them in /etc/httpd/sites/0000_any_80_.conf and changed AllowOverride None to AllowOverride All.
  3. Then I edited the conf file for the virtual server I was using, in this case it was called 0005_any_80_cms.dev.conf. Once again I set AllowOverride None to AllowOverride All.
  4. I’ve no idea at the moment if this is the right way to do it all, but it does seem to work. I’ll post more should I find any problems or the ‘proper’ way to do it.

    Warning: Don’t try this unless you know what you are doing. I’ve noticed a few problems already so at the very least BACKUP ALL YOUR FILES FIRST!