Re: [users@httpd] how to prevent directory listing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
</Directory>

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:

<init-param>
            <param-name>listings</param-name>
            <param-value>false</param-value>
</init-param>

which prevents directory listing.

Hope this helps!
Regards
QT


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux