Into the original httpd.conf, I have
Options Indexes FollowSymLinks
I created a config file in /etc/httpd/conf.d/ with
NameVirtualHost 192.168.0.2:8009
<VirtualHost 192.168.0.2:8009>
DocumentRoot /var/www/html/deve
ServerName "deve:8009"
ErrorLog /var/www/deve_errorlog
CustomLog /var/www/deve_customlog common
Options -ExecCGI -Indexes
</VirtualHost>
I restart the server and I still can see files in
http://192.168.0.2:8009/images
I tought that the more specific rule overides the general one
Where do I miss something ?
Best Answer
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
is merged with
to form
Have a look at the apache documentation http://httpd.apache.org/docs/2.2/mod/core.html
and specifically at the example:
Hence, the behaviour Apache is exhibiting with your configuration is correct.
I would just explicitly declare the options for the NameVirtualHost as follows: