mac apache forbidden

There's a common issue people are experiencing when they upgrade their Mac to Snow Leopard (10.6) with forbidden issues whilst accessing websites created through Apache's virtual hosts. The problem is simple, the new httpd.conf file in Snow Leopard is a bit more strict, and so it should be, simply follow the steps below to fix the problem.

Assuming you have Apache2 running and you have your vhost file setup and working. Open your vhost file and make the following modifications:

  1. sudo vi /etc/apache2/extra/httpd-vhosts.conf

Opens your httpd-vhosts.conf file with vi

  1. <Directory /path/to/your/website>
  2. Options FollowSymLinks
  3. AllowOverride All
  4. Order Allow,Deny
  5. Allow from all
  6. </Directory>

Add the block above within your tags, save the file, and restart apache (sudo apachectl restart).

That's it, you simply need to tell Apache to allow access from all. If you want to secure this further you may Allow from your own computer only (127.0.0.1).