I have the following vhost configured:
<VirtualHost *:80> DocumentRoot /var/www/myvhost ServerName myv.host.com ServerAlias myv.host.com ErrorLog logs/myvhost-error_log CustomLog logs/myvhost-access_log combined ServerAdmin firstname.lastname@example.org <Directory /var/www/myvhost> AllowOverride All Options +Indexes </Directory> </VirtualHost>
The configuration appears to be correct from the
apachectl tool's perspective.
However, I cannot get a directory listing on that vhost:
Forbidden You don't have permission to access / on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
The error log shows the following:
[Wed Mar 07 19:23:33 2012] [error] [client 188.8.131.52] Directory index forbidden by Options directive: /var/www/******
More recently, the following is now kicking-into the error.log:
[Wed Mar 07 20:16:10 2012] [error] [client 184.108.40.206] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /var/www/error/noindex.html
Today, the following is getting kicked-out:
[Thu Mar 08 14:05:56 2012] [error] [client 220.127.116.11] Directory index forbidden by Options directive: /var/www/<mydir> [Thu Mar 08 14:05:56 2012] [error] [client 18.104.22.168] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /var/www/error/noindex.html [Thu Mar 08 14:05:57 2012] [error] [client 22.214.171.124] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
This is after modifying the
vhosts.conf file thusly:
<VirtualHost *:80> DocumentRoot /var/www/<mydir> ServerName myhost ServerAlias myhost ErrorLog logs/myhost-error_log CustomLog logs/myhost-access_log combined ServerAdmin admin@myhost <Directory "/var/www/<mydir>"> Options All +Indexes +FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
What is missing?
All subdirectories of the root directory do directory listings properly - it is only the root which cannot.