Apache2 and Leopard
Posted on April 27, 2008 at 10:50 PM
I recently upgraded from Tiger to Leopard (the newest Mac OS). The upgrade went VERY smoothly. I chose the basic "upgrade" path rather than the "archive and install" bloat or "scorched earth" start over again. I did this because I do web development on my Mac, and I didn't want to reinstall all that stuff. Yes - I know, most (all?) of it is in /usr/local, but still.
Leopard ships with Apache2 rather than the Apache 1.x version that was in Tiger. This is great, except that Apache hates me.
I recently made the decision to not pretend to be a SysAdmin when I decided to cancel my SliceHost account. Tonight only bolstered my confidence in that decision because I spent about the last 2 hours getting my virtual hosts to work properly.
I currently have 8 active virtual hosts running on my mac, and 2 of them use Server-Side Includes. Those sites are hosted with Network Solutions, and they are kind enough, unlike Yahoo's ghetto hosting, to allow such a thing.
So here's what I had to do:
General setup/config ... Still busted.
No dice. WTF? More google.
Ahhh...apachectl configtest
The example in the default httpd-vhosts.conf file that ships with the OS is busted. Awesome. Fix that (by commenting it all out), and booyah! The 6 virtual hosts that do not do SSI are up and running.
One of the links says the DocumentRoot directive needs to be quoted, but it does not.
Now to get the SSI to work. Comment #8 pretty much got me there. I had to update some things in the httpd.conf file, too. Also note that it was Options Includes in apache, but now it's Options +Includes. That's progress, people!
Here's what I changed in the httpd.conf:[IfModule dir_module]
DirectoryIndex index.html index.htm index.shtml
[/IfModule]
# uncomment these lines
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
I think that's it. Bouncy bouncy, and it should work.
Comments
There are 0 comments on this post. Post yours →
Post a comment
Required fields in bold.