What is the difference between

<Directory /var/www/>
Options All -Indexes
</Directory>

and

<Directory /var/www/*>
Options All -Indexes
</Directory>

?

The first does not work, the second does work, on my server. And there doesn't appear to be any other configuration files overriding the setting. I thought they meant the same thing.


Edit: It turns out there was another configuration file affecting the server that was overriding this one, so that was causing the unexpected result. I guess having * superseded the other configuration file.

link|improve this question

43% accept rate
feedback

2 Answers

/var/www/ includes all files in the directory. /var/www/* does not include hidden files. I see a .htacess file in your future.

link|improve this answer
feedback

Strange. I just checked and the first one works for me. Do you have any files in the directory? When you are changing directory are you using the following command?

cd /var/www

If you are typing an extra "/" at the end such as:

cd /var/www/

then it may be looking for another directory.

link|improve this answer
It turns out there was another configuration file affecting the server that was overriding this one, so that was causing the unexpected result. I guess having * superseded the other configuration file. – mattloaf1 Nov 26 '09 at 17:28
@mattloaf1 - could you please say which file was that? thank you – pootzko Nov 7 '10 at 18:34
feedback

Your Answer

 
or
required, but never shown

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