403 Error after upgrading from Snow Leopard to Lion

apache-2.2mac-osx

I had several virtual hosts working perfectly on my iMac under snow leopard (10.6.8). I upgraded to Lion(10.7). I had saved my httpd.conf under a different name and simply renamed the new Lion httpd.conf and reamed my saved custom file to httpd.conf. I restarted apache.

Now when I point my browser at the proper web address, I get a 403 error:

Forbidden

You don't have permission to access {resource name} on this server.

I have a custom name for the web site which is how the virtual site is accessed, the name is defined in my hosts file and I verified that the name resolves to the correct ip address (It seems hosts entries under Lion are now case sensitive).

I even went so far as to change the name of the apache user to my user account and still get the error (my acct owns the html files that the web server is serving).

I have verified that apache is using the httpd.conf file that I expect it to use.

Best Answer

Things I would check:

  • Check the error log to see if there's any more information provided there
  • Check the User/Group that apache is running as. At the very least, apache needs to have read privileges and executable privileges on the parent directories (source: http://wiki.apache.org/httpd/13PermissionDenied)
  • Are you trying to access a directory? Does the directory have a index file (index.html, index.php) that is identified by 'DirectoryIndex'? If not, do you have it enabled to display a directory listing (Options Index)

If you would update the question with any relevant error_log entries, that can help diagnose the issue.