-2

Does this syntax prevent indexes to be visable in var/www?

 <Directory "/var/www">
   Options FollowSymLinks
   AllowOverride All
   Order allow,deny
   Allow from all
 </Directory>

or do is "Options -Indexes" required in httpd.conf or .htaccess?

1 Answers1

2

Not trying to be mean, but Have you read the Apache Manual?

Relevant text:

Normally, if multiple Options could apply to a directory, then the most specific one is used and others are ignored; the options are not merged. (See how sections are merged.) However if all the options on the Options directive are preceded by a + or - symbol, the options are merged. Any options preceded by a + are added to the options currently in force, and any options preceded by a - are removed from the options currently in force.

It's a bit dense, but what it's saying is essentially "either will work, as long as there is no Options directive later that overrides it". If you want to be certain, you should specify -Indexes for each directory you want to protect.

voretaq7
  • 79,879
  • 17
  • 130
  • 214