httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Linn Kubler" <>
Subject Re: [users@httpd] .htaccess setup? - solved
Date Wed, 29 Jan 2003 21:51:33 GMT

>>> 01/29/03 03:19PM >>>
On Wed, 29 Jan 2003, Linn Kubler wrote:
> <Directory "/var/www/html">
>  AllowOverride AuthConfig
>  AuthType Basic
>  AuthName "ECW Restricted Area"
>  AuthUserFile /var/www/passwords
>  Require user linn
> </Directory>
> Does that make sense?  I restarted apache but it still doesn't work.

That is fine, except you don't need the AllowOverride, which only
.htaccess files.

The fact that it doesn't work likely implies one of the following:

1. The content isn't really at /var/www/html.  Do you have any
getting in the way?  What exactly does the access_log and error_log say
you request a file that doesn't exist in that directory?  Where does
DocumentRoot point?

If the point is to protect the entire site, an easy way to do it is to
<Location /> in place of <Directory ...>

2. You aren't editting the right httpd.conf file.  If you put an
syntax error in the file and try to restart does apache complain?  If
that is your problem.


Ok, another typo... that first line really reads:
<Directory "/var/www/html/bod">
I'm only trying to protect the one directory.

Ah, you nailed it!  I forgot that I had changed the DocumentRoot
directory but didn't propagate it through the file.  I changed it back
to /var/www/html and changed ownership of the password file to apache
and surprise, surprise, it works!

Cool, thanks everyone who responded, now, onward and upward... 


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message