[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Apache-ssl .htaccess files



On Sun, 29 Dec 2002 22:45:47 -0800 (PST)
Bill Moseley <moseley@hank.org> wrote:

> 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:
> > 
> > <Directory>
>            ^^^
> 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
> > </Directory>
> > 
> > I also tried it w/o the <Directory> tags, but it didn't seem to
> > affect anything. 
> 
> 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 moseley@hank.org

Yet another example of a faulty interface between my keyboard and
computer chair... :-[ - the wrong use of Directory tags.

In the process of making the suggested mods to apache-ssl/httpd.conf I
found another "AllowOverride None" line; this time for the Documentroot,
which seems to have an affect on everything down the line from there. I
changed it to "AllowOverride All" as well, and apache's now reading and
using the .htaccess file properly. (After deleting the Directory tags
from the .htaccess... not sure if it had any affect in the process or
not).

I haven't bothered testing the suggested changes to httpd.conf yet,
since .htaccess is working now, and was the original goal.

Thanks for the help,
Jacob

----- 
GnuPG Key: 1024D/16377135

In a world without fences, who needs Gates?
http://www.linux.org/

Attachment: pgpdaNeGu1bGC.pgp
Description: PGP signature


Reply to: