Apache 2 virtual hosts with Leopard

There’s some funny default setting with apache2 that will make your virtual hosts web sites not working at all. The fix is to modify the httpd-vhosts.config accordingly.

By default, the CustomLog’s path is in double quote like this
CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log common"

Apache2 will complain as there’s no enough arguments. To fix it, remove the double quotes. (Of course, you need to set the correct path)
CustomLog /private/var/log/apache2/dummy-host.example.com-access_log common

Then you’ll encounter permission denied after apache2 successfully started. You’ll need to add this to allow access to your web sites.


Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

After adding the above lines, things should be fine. Happy web-dev on Leopard.