httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] Disable directory browsing
Date Wed, 26 Sep 2007 19:06:34 GMT
On 9/26/07, Rikard Bosnjakovic <rikard.bosnjakovic@gmail.com> wrote:
> I have been reading on
> http://httpd.apache.org/docs/2.2/mod/core.html#options and in a couple
> of tutorials on the net, but I cannot seem to get this to work as I
> want.
>
> What I want is to disable _all_ directory browsing on my server. What
> I have tested is to att an "Options -Indexes" within the <Directory
> />-clause (and restarted Apache), but with no luck. Adding it in a
> <Directory /images> still doesnt disable it for the /images-directory.
> Only when I added a <Directory "/full/path/to/images"> I got it to
> work, but only for that particulary directory.
>
> How do you add a -Indexes that affects the *whole* site?

You can't, really. A quick work-around might be
<Location />
Options -Index
</Location>

Or simply get rid of mod_autoindex from your loaded modules.

But the correct solution is to search through all your conf files and
remove "Indexes" from every Options directive that you find.

The reason the single -Indexes doesn't work is because it will be
overridden by other Options directives applying to more specific parts
of the filesystem.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message