Koozali.org: home of the SME Server

disallow apache file listing

alex

disallow apache file listing
« on: November 09, 2001, 04:09:46 PM »
does anyone know howto disallow apache file listing?
this is what i mean: http://cms.visualic.de/images/

Luke Drumm

Re: disallow apache file listing
« Reply #1 on: November 11, 2001, 12:49:14 AM »
While no doubt somebody will post the 'official way' (ie. altering the httpd.conf file) a rather simplisitic option that may interest you in the mean time is simply placing an index.html file in the directorie(s) concerned.

Apache will only resort to file display listings when it can't find any html, cgi or php file to chew on. If you provide it an 'index.html' then apache will always opt for displaying it rather than your file listing.

Regards,
Luke

Confucius

Re: disallow apache file listing
« Reply #2 on: November 12, 2001, 01:18:58 PM »
I think this page (bottom section) gives you the answer you were looking for.

http://www.redbooks.ibm.com/SG245132/5132c52.htm

Grtx, Harro

saroumane

Re: disallow apache file listing
« Reply #3 on: November 13, 2001, 12:39:57 AM »
apache give the containt of a directory when i didn't found any file that is given with the DirectoryIndex options in his conf file (httpd.conf) and that indexing is not defend in the Directory container
you can override this by customizing your httpd.conf file

goto /etc/e-smith/templates/etc/httpd/conf/httpd.conf
ln this directory, you can see some files
these are parts of the httpd.conf (see customize on main page of this site)
edit the file 90e-smithAccess10Primary
search for the directory or parent directory you don't want to index
something like

if this is the right file you'll copy it to a new directory for preserving it and customize it in safe
make the directory /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
copy the file into this new one
goto this new directory and edit the file
just remove 'Indexes' from the 'Options' directive in the concerned 'Directory' container

save the file
make the follow command
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
this will rebuild the file httpd.conf
restart apache with
/etc/init.d/httpd restart

hope this will help you
a+

alex

Re: disallow apache file listing
« Reply #4 on: November 14, 2001, 03:28:04 PM »
thanx all for help, alex