Re: Apache-ssl .htaccess files
On Mon, 30 Dec 2002, Jacob S. wrote:
> Howdy List,
> I keep thinking this is a simple problem and ought to have a simple fix,
> but all I'm succeeding at doing is pulling out my hair.
> I'm trying to require logins to a certain directory on my webserver
> using .htaccess files. I've got the following in the .htaccess file in
> the directory needing to be password protected:
Is that a copy-n-paste error? I think so since Apache probably wouldn't
restart without a path there.
You also can't use Directory inside an .htaccess. Doesn't make sense.
> AuthType Basic
> AuthName "Conlaw login"
> AuthUserFile /usr/lib/apache-ssl/passwd/passwdfile
> Require valid-user
> I also tried it w/o the <Directory> tags, but it didn't seem to affect
Then maybe it's not reading the .htaccess file.
Try the same config in httpd.conf (but with the <directory /foo> tags).
If that works then make sure you have AllowOverride for that directory.
You can always use strace and run httpd -X and see if it's reading
.htaccess at all (I doubt it because it would give an error otherwise).
Bill Moseley email@example.com