Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following vhost configured:

<VirtualHost *:80>
    DocumentRoot /var/www/myvhost
    ErrorLog logs/myvhost-error_log
    CustomLog logs/myvhost-access_log combined
    <Directory /var/www/myvhost>
        AllowOverride All
        Options +Indexes

The configuration appears to be correct from the apachectl tool's perspective.

However, I cannot get a directory listing on that vhost:


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] 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] 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] Directory index forbidden by Options directive: /var/www/<mydir>
[Thu Mar 08 14:05:56 2012] [error] [client] 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] 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

What is missing?

update 4

All subdirectories of the root directory do directory listings properly - it is only the root which cannot.

share|improve this question
Anything interesting in your error log ? What does your browser display ? – Iain Mar 7 '12 at 19:44
@Chris S - no mod_index listed in the httpd.conf - nor is there a mod_index on the filesystem – warren Mar 7 '12 at 19:49
is there a local .htaccess file that might be setting -Indexes ? – voretaq7 Mar 7 '12 at 19:50
@voretaq7 - no .htaccess in this vhost – warren Mar 7 '12 at 19:50
@warren Sorry, that should have been mod_autoindex, it's the module that creates directory listing pages. – Chris S Mar 7 '12 at 19:52

A 403 means the resource is being found. Check that apache has at some level permission to r-x the document root and all the directories above it and r-- the files therein.

Try changing you Directory directive to

<Directory /var/www/myvhost>
    AllowOverride All
    Options +Indexes
    Order allow,deny 
    Allow from all
share|improve this answer
775 on the parent dir, and at least 644 on all contents – warren Mar 7 '12 at 19:58
check it has suitable r-x perms on /var and /var/www too. – Iain Mar 7 '12 at 20:01
all other vhosts on this server render properly - which makes this really annoying. Also, even with an 'index.htm' file added, still getting a 403 error – warren Mar 7 '12 at 20:15
If the filesystem paths are ok then something else is blocking it try adding Order allow,deny Allow from all to your vhosts <Directory /var/www/myvhost> definition – Iain Mar 7 '12 at 20:23
added - and still no dice ... fs perms look completely normal: vhost config looks like all others (except for the directory listing bit). – warren Mar 7 '12 at 20:28

I had a similar problem today where I was seeing an error like yours shown above:

[Wed Oct 17 14:19:08 2012] [error] [client] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /var/www/mysite/

Mixing options with and without +/- is problematic, note the apache docs on options:

Mixing Options with a + or - with those without is not valid syntax, and will be rejected during server startup by the syntax check with an abort.

Also the effect of validly using a directive without a +/- removes all other previously set directives for that directory.

I had used an Indexes without the + and had the error I copied above.

Since you say you are not using any .htaccess files, why not change the Directory directive to this:

<Directory /var/www/myvhost>
    AllowOverride None
    Options +Indexes
    Order allow,deny
    Allow from all
share|improve this answer
up vote 0 down vote accepted

My solution (as of 21 Mar 2012)

  • move all content to a subdirectory
  • create a redirect index.html file in the root that reloads to the subdirectory

I still want to know why I cannot just traverse the directory itself, but this is working for now.

share|improve this answer

On my CentOS 5/6/7 systems this problem is caused by some kind of conflict in the default /etc/httpd/conf.d/welcome.conf that comes with the system. Commenting every line of welcome.conf out and restarting the webserver results in the directory index to be viewable in the webroot. It appears to simply be a bug in the default webserver configuration that ships out of the box at least on Red Hat/CentOS systems, but potentially others as well. Your system may have been experiencing a similar issue.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.