View Full Version : apache question
magnatique
07-25-2001, 01:11 PM
how do you set apache not to show by default any directory content?
that is if a user types
www.domain.com/pics (http://www.domain.com/pics)
he won't see the dirs/files in that directory..
that is, by default without me putting a htaccess in all dirs..
In telnet/ssh type:
chmod o-x /path/to/pics
Done
moses
07-25-2001, 01:27 PM
Magnatique:
What you want to do is disable the option "Indexes". If you want to do it for everything on the server, and have root (i.e. you can modify httpd.conf), you can do:
<Directory /path/to/sites>
Options -Indexes
</Directory>
Like if all of your sites were under /usr/local/www you would do
<Directory /usr/local/www>
or if you had multiple users and stuff was served out of /home/usernames you could do
<Directory /home>
You could also look in httpd.conf for whatever is setting the options for that area already, and remove the Indexes option.
If you don't have root, you can stick an .htaccess in the top level of each site with the line
Options -Indexes
and that will do it for everything underneath that spot, as long as it's not overridden by an htaccess underneath it.
Moses
magnatique
07-25-2001, 06:36 PM
thanks moses http://bbs.adultwebmasterinfo.com/ubb/smile.gif
I'll go edit that httpd http://bbs.adultwebmasterinfo.com/ubb/smile.gif
thanks again!
vBulletin® v3.7.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.