How to disable directory listing of /icons/

4 posts / 0 new
Last post
#1 Sat, 06/06/2015 - 02:05
Purple Edge

How to disable directory listing of /icons/

I ran Nikto over my site and it showed that mysite.com/icons/ gave a directory listing, so does...

http://virtualmin.com/icons/

...how do we disable that?

Sat, 06/06/2015 - 02:34
Diabolico
Diabolico's picture

.htaccess and use this "Options All -Indexes"

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Sun, 06/21/2015 - 20:22 (Reply to #2)
Purple Edge

Thanks Diabolico,

The listing results from an alias of the apache /icons/ folder - I "fixed" it by editing my httpd.conf file so it now contains...

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"
 
# New stuff \#
 
Alias /icons/ /user/www/icons/
 
<Directory "/var/www/icons">
     Options -Indexes +MultiViews
     AllowOverride None
     Order allow,deny
     Allow from all
</Directory>
 
#end of new stuff
Sat, 06/06/2015 - 03:02
Diabolico
Diabolico's picture

Sorry i'm stupid this morning, blame lack of first morning coffee. Didnt notice that icons are from apache so this is what you need to do on Centos:

- go to /etc/httpd/conf.d
- nano autoindex.conf (or any other editor)
- find line something like this "Options Indexes MultiViews FollowSymlinks"
- delete Indexes
- restart apache
- no more indexing (you will get 403)

Not sure for other OS but i think it should be the same.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Topic locked