August 8th, 2012, 10:24 AM
My Virtual hosts no longer work after upgrading to Mountain Lion
Hey guys. I have a website and do local development on my laptop. Here's what I have.
In my /etc/hosts files, I have:
Under /etc/apache2/extra/httpd-vhosts.conf I have
Now if you notice, the "Directory" option is set to "/Users/my_user/Sites/some_sub_dir" and not "/Users/my_user/Sites/some_sub_dir/my_local_site.com", because that allows me to have my sites on my thumbnail drive. So the "my_local_site.com" directory is actually a symlink to directories on my thumbnail drive. This is my work laptop and I'd rather not have my code on the actual laptop hardrive.
CustomLog "/private/var/log/apache2/my_local_site.com-access_log" common
Under my httpd.conf file, I have
# User home directories
# Virtual hosts
This is a setup that I've used in previous versions of mac os x with no problem, but since my upgrade to mountain lion, I continue to get the following in the logs:
[Tue Aug 07 23:55:01 2012] [error] [client 127.0.0.1] client denied by server configuration: /Users/my_user/Sites/some_sub_dir/my_local_site.com/
[Tue Aug 07 23:55:01 2012] [error] [client 127.0.0.1] client denied by server configuration: /Users/my_user/Sites/some_sub_dir/my_local_site.com/favicon.ico
I tried getting rid of the "my_local_site.com" symlink and just creating a regular "my_local_site.com" directory and putting an index.html file under there and I have the same error. There are no syntax errors in any of my configuration files and the error I'm getting is not all that descriptive. Anybody have experience with this?