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

RE: [cobalt-developers] Directory Browsing Question.



Make a .htaccess file in the directory where you don't want indexing,
and put the following in it:

Options -Indexes

This takes effect for that directory and all subdirectories. If you want
a specific subdirectory to have indexing, make another .htaccess there
and put 

Options +Indexes

in it.

This usually requires AllowOverride in srm.conf to be set to All; I set
it to All regardless so I can put any directive in a .htaccess file.
(Not sure of the security risks of doing this for a server full of web
hosting customers; we do it on all of our servers and haven't had a
problem yet, but that doesn't mean there are no security risks
associated with doing that.)

Erica Douglass
Lead Web Developer
Simpli, Inc.

> -----Original Message-----
> From: cobalt-developers-admin@xxxxxxxxxxxxxxx 
> [mailto:cobalt-developers-admin@xxxxxxxxxxxxxxx] On Behalf Of 
> Gavin Nelmes-Crocker
> Sent: Monday, March 24, 2003 12:15 PM
> To: cobalt-developers@xxxxxxxxxxxxxxx
> Subject: RE: [cobalt-developers] Directory Browsing Question.
> 
> 
> 
> > How do I turn off directory browsing for the whole server and just 
> > allow browsing for a few?
> >
> > I like this feature for some directories on my server yet I need it 
> > disabled for all others?
> >
> 
> Brian,
> 
> The easiest way would be the following I think
> 
> Server wide - change the following line in /etc/httpd/conf/access.conf
> 
> Options  Indexes FollowSymLinks Includes MultiViews
> 
> remove Indexes
> 
> remembering to reload http
> 
> Now I think you should be able to use a .htaccess in the 
> areas that you want to view files to override the system wide 
> config - maybe someone else will chip in with a .htaccess 
> config that does this as I can't remember how I did it or 
> which server I did it on.
> 
> Regards
> 
> Gavin
> 
>