Apache 2.0.51 on FC2

David L Norris dave at webaugur.com
Wed Nov 17 03:02:41 UTC 2004


On Tue, 2004-11-16 at 18:35 -0800, Daniel B. Thurman wrote: 
> I have searched everywhere to for information on how to make all
> of my directories non-browsable by default whereever default indexes
> do not exist.

Well, I believe you can use the system-config-httpd GUI to modify that
per-virtual host or per directory.

> From what I can tell, I am supposed to either supply
> empty default index files with no content (index.html) or to add a .htaccess
> file in every directory with one both of the following entries:
> 
> 1) Options -Indexes
> 2) deny from all

Well, that's not what the Apache documentation says...

Context: server config, virtual host, directory, .htaccess
   http://httpd.apache.org/docs/mod/core.html#options

So, that means you need to add the option in the main body of the server
config, a virtual host config, a directory config, or a .htaccess file.
By default on Fedora Core the first three are defined in one of the
server config files:
  /etc/httpd/conf/httpd.conf
  /etc/httpd/conf/vhosts/*.conf
  /etc/httpd/conf.d/*.conf

By default, the httpd.conf supplied with Fedora Core enables the Indexes
option in the Directory section for /var/www/html in httpd.conf.
Removing it there and would remove it for everything under /var/www/html
directory.

Make your changes and run:
  /sbin/service httpd reload

> >From my testing, it seems to work going into the forward direction
> but not in the reverse direction.

I'd suggest reading the Apache documentation.  It explains these sorts of details.

The .htaccess tutorial might be a good start:
  http://httpd.apache.org/docs-2.0/howto/htaccess.html

-- 
 David Norris
  http://www.webaugur.com/dave/
  ICQ - 412039
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20041116/e385b0b1/attachment-0001.sig>


More information about the fedora-list mailing list