View Single Post

  #4 (permalink)  
Old 10-01-2005
Klaus Johannes Rusch
 
Posts: n/a
Default Re: Apache - Surprised by web access to .htaccess etc.

Alan J. Flavell wrote:

> I've just stumbled on a surprise, which I thought I'd put on record,
> and possibly propose a change to the distributed configuration sample.
>
> In the distributed Apache configuration, there's a stanza like this:
>
> <Files ~ "^\.ht">
> Order allow,deny
> Deny from all
> </Files>
>
> which denies web access to .htaccess and, possibly, other sensitive
> files (.htpasswd maybe).


A handler is an alternate way to protect these files without relying on
permissions settings:

AddHandler ignore .htaccess
AddHandler ignore .htgroup
AddHandler ignore .htpasswd
Action ignore /script/error403

--
Klaus Johannes Rusch
KlausRusch@atmedia.net
http://www.atmedia.net/KlausRusch/