Using XAMPP, Error 403 Access Forbidden
(FOUND A WORKING SOLUTION): http://maff.ailoo.net/2008/07/set-up-multiple-virtual-hosts-on-xampp-for-windows/
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot D:/srv/xampp/projects/testproject/public
ServerName testproject
<Directory "D:/srv/xampp/projects/testproject/public">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
This worked for me with Ubuntu 11.10 and version 1.7.7 in httpd.conf i've added the # in the directory to have it work with vhosts. My vhosts were located outside of the root folder...
And change user and group from nobody to your username:
User nobody
Group nobody
</IfModule>
</IfModule>
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
# Options FollowSymLinks
# AllowOverride None
# Order deny,allow
# Deny from all
</Directory>
In the apache folder, go to extra
and then open file httpd-xamp.conf
.
Edit the following lines:
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
Change the above configuration like below:
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from all
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
Now restart XAMPP, it will work.
Here is an update for newer versions of XAMMP. The syntax has changed a little. Note the line: Require all granted in the Directory block.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot D:/srv/xampp/projects/testproject/public
ServerName testproject
<Directory "D:/srv/xampp/projects/testproject/public">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>