httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kutter <>
Subject Re: [users@httpd] how to prevent directory listing
Date Mon, 03 Jul 2006 07:06:27 GMT
Hi Rajesh

 > How can I prevent directory listings of my server?

To prevent directory listing, you have (as far as I know) 3 options:

1. Put an empty index/default-Page in each directory (i.e. index.html)
--> of course, this is inefficient, but works (there are still hosters 
out there, that offer you this as a 'solution'!)

2. .htaccess-File, insert the following line:
Options +Indexes
--> This will only work if your apache.conf (or httpd.conf, or 
apache2.conf) allows .htaccess-configuration (AllowOverride etc.)

3. Change httpd.conf/or apache2.conf file
<Directory /var/web/site>
         Options -FollowSymLinks -Indexes

or something like this.

 > What configurations required at http server and tomcat?

As far as I know, it depends on whether you run/install tomcat 
'standalone' or as apache-tomcat (under apache).
Anyway, there is a directive for your web.xml-file:


which prevents directory listing.

Hope this helps!

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message