MacOSX VirtualHost: "You don't have permission to access / on this server" error
- by David Casillas
The Apache instalation of MacOSX is running Ok.
I have tried to create a VirtualHost called test.local, but as soon as I uncomment from /private/etc/apache2/httpd.conf the line
Include /private/etc/apache2/extra/httpd-vhosts.conf
, and try to access test.local virtualhost I get an error "You don't have permission to access / on this server".
The VirtualHost configuration in /private/etc/apache2/extra/httpd-vhosts.conf is:
<VirtualHost *:80>
ServerName test.local
DocumentRoot "/Users/username/Sites/Test/public"
<Directory "/Users/username/Sites/Test/public">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I have also include the VirtualHost in hosts file:
127.0.0.1 test.local