403 Forbidden error when accessing localhost on Mac OS X10.8 403 Forbidden error when accessing localhost on Mac OS X10.8 apache apache

403 Forbidden error when accessing localhost on Mac OS X10.8


To fix that issue check this link http://www.coolestguidesontheplanet.com/downtown/how-set-virtual-hosts-apache-mac-osx-109-mavericks-and-osx-108-mountain-lion read the "Losing Localhost" part.

The error occurs just after you enable vhosts in the httpd.conf file. By uncommenting this line:

Include /private/etc/apache2/extra/httpd-vhosts.conf

Adding this in the httpd-vhosts.conf will fix your issue. Just remember to add new vhosts before this one :D

<VirtualHost *:80>    ServerName localhost   DocumentRoot /Library/WebServer/Documents/</VirtualHost>

I hope this solves your problem!