Forum Moderators: phranque

Message Too Old, No Replies

Newbie with authentication hassles

         

woger

1:32 am on Feb 24, 2005 (gmt 0)



Hi
I'm running Apache 1.3.23 on Win Xp using localhost.

I'm trying to learn authentication, but am stuffing it up somehow.

I created a user using htpasswd - for now leaving it in the bin/users

I then added the following to my httpd.conf file, restarted apache.
<Directory "C:/Program Files/Apache Group/Apache/htdocs/test">
AuthName "restricted stuff"
AuthType Basic
AuthUserFile "C:/Program Files/Apache Group/Apache/bin/users"

Require valid-user
</Directory>
When I try to access the directory test, an authentication screen pops up, but doesn't allow me access. I get a 401 error.

Apache has been working fine - handling php and sql - but I've obviously stuffed up something here.

Can anyone please help?

jdMorgan

3:06 pm on Feb 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



woger,

Welcome to WebmasterWorld!

The only thing I note is that you've used full system paths for both <directory> and for AuthUserFile, while is is more usual to see these specified as relative paths from DocumentRoot. Assuming that you used Apache's built-in password generator to create the user, I don't see any other problems.

Jim