I'm setting up virtual hosting on my macbook for testing websites. I added 127.0.0.1 lookups to the sites in question in /etc/hosts and then enabled virtual hosting in httpd.conf by uncommenting the line that includes the vhost configuration file.

This gets my virtual hosts working fine, but it's had an unwanted side-effect.

When I try to access localhost, I'm now getting 403 forbidden. If I comment the line that includes the vhosts config file back out then localhost goes back to working as it should. The problem seems to only be limited to http://localhost (which serves from /Library/WebServer/Documents/). The contents of ~/Sites/ can still be accessed by http://localhost/~username/ without problems regardless of whether vhosting is on or off.

I'm assuming that this is some sort of permission problem, but /Library/WebServer/Documents and all its content is readable by httpd.

If anyone has any insight as to why this might be happening, I'd appreciate it if you helped me out.

The system is running Snow Leopard and Apache 2.2 (Apple stock version, not a customized build) with all configuration files in their default state, except with vhosts enabled and mod_php enabled.

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.