httpd-users mailing list archives

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


>>> joshua@slive.ca 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
affects
.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
symlinks
getting in the way?  What exactly does the access_log and error_log say
if
you request a file that doesn't exist in that directory?  Where does
your
DocumentRoot point?

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

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

Joshua.

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... 

Thanks,
Linn



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message