Hi,
I have added a virtual directory to an apache web server and the virtual directory is located outside the document root. I configured the httpd.conf how it is decripted in the apache doc
When I access the virtual directory an error “Access forbidden! Error 403” occured. The config seems to ok:
1 2 3 4 5 6 7 | Alias /virtualdirectory/ "D:/user/www/virtual/" <Directory "D:/user/www/virtual/"> Options Indexes FollowSymLinks MultiViews ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> |
Solution:
The default apache configration is very restrictive. It do not allow to access directories without authentication. This is defined in the Directory section of httpd.conf:
1 2 3 4 | <Directory> AllowOverride none Require all denied </Directory> |
Add a “require all granted” directive to your virtual directory section will grant the access.
1 2 3 4 5 6 7 8 | Alias /virtualdirectory/ "D:/user/www/virtual/" <Directory "D:/user/www/virtual/"> Options Indexes FollowSymLinks MultiViews ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> |