Forum Moderators: phranque

Message Too Old, No Replies

Password Protecting with htaccess and htpasswd

I'm having a problem password protecting with htaccess and htpasswd

         

jzimmerlin

12:37 am on Jan 17, 2005 (gmt 0)



I'm experiencing problems password protecting a directory on my web server using .htaccess and .htpasswd. I've been successful in getting my web server to require a login. However, it appears (from the errors in my error log) that my web server is having trouble locating the htpasswd file. As a result, the login, even if it is using the correct password, fails. My .htaccess files says:

AuthName "Password Protected"
AuthType Basic
AuthUserFile /conf/.htpasswd
Require valid-user

My .htpasswd file is located in C:\Program Files\Apache Group\Apache\conf\.htpasswd

My .htpasswd file says:
Jeff:(the encrypted password)

What am I doing wrong?

Caterham

2:25 pm on Jan 17, 2005 (gmt 0)

10+ Year Member



You have to use the full physical path to your .htpasswd instead of the webserver path

AuthName "Password Protected"
AuthType Basic
AuthUserFile "C:/Program Files/Apache Group/Apache/conf/.htpasswd"
Require valid-user

Bob