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

Into the original httpd.conf, I have

Options Indexes FollowSymLinks

I created a config file in /etc/httpd/conf.d/ with

    DocumentRoot /var/www/html/deve
    ServerName "deve:8009"
    ErrorLog /var/www/deve_errorlog
    CustomLog /var/www/deve_customlog common
    Options -ExecCGI -Indexes

I restart the server and I still can see files in

I tought that the more specific rule overides the general one

Where do I miss something ?

share|improve this question
What if you visit deve:8009/images ? – derobert Sep 13 '09 at 3:49
Your ServerName should probably not have the :8009 portion, just the actual name. – Marcin Sep 13 '09 at 3:51
up vote 8 down vote accepted

You are basically correct, however missing a subtlety in the use of Options.

First, however, don't just stick them in the NameVirtualHost container, use a Directory Statement...

You are correct that the most specific ones apply, however, if an options statement contains a list of options where every one is prefixed with a + or -, then the options are merged with any existing options...

This means

Options Indexes FollowSymLinks

is merged with

Options -ExecCGI -Indexes

to form

Options Indexes FollowSymLinks -ExecCGI

Have a look at the apache documentation

and specifically at the example:

...if the second Options directive uses the + and - symbols:

<Directory /web/docs>
   Options Indexes FollowSymLinks

<Directory /web/docs/spec>
   Options +Includes -Indexes

then the options FollowSymLinks and Includes are set for the /web/docs/spec directory.

Hence, the behaviour Apache is exhibiting with your configuration is correct.

I would just explicitly declare the options for the NameVirtualHost as follows:

<Directory /var/www/html/deve>
  Options +FollowSymlinks -Indexes -ExecCGI
share|improve this answer

Hey @ColtonCat, I have a question about your answer. Why did you think Indexes FollowSymLinks merging with -ExecCGI -Indexes forms Indexes FollowSymLinks -ExecCGI? Shouldn't it be FollowSymLinks -ExecCGI. The example from Apache doc seems working in that way, i.e. -Indexes in /web/docs/spec removes Indexes in /web/docs. Did I miss anything here? Do you think the actual culprit is that Options should be put into "Directory" directives? (I'm sorry that I had to write this as an answer because I cannot post comment yet)

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.