Forum Moderators: phranque

Message Too Old, No Replies

Another .htaccess query...

         

Dyamar

8:38 pm on Feb 7, 2004 (gmt 0)



I've recently set up an apache server on my local machine and am trying to set up an .htaccess file with a .htpasswd file for user login to a specific folder.

I'm running Apache 2 on a XP Pro machine and have (as far as I can see) set up the .htaccess and .htpasswd files without a hitch.

The problem has arisen that even though the htaccess file points flawlessly to the htpasswd file, I can't log into the folder. I type the username and password when prompted but it just returns. And then (obviously) returns an error after the password has been entered 3 times.

my .htaccess file is as follows:

AuthUserFile htdocs/phpadmin/.htpasswd
AuthGroupFile /dev/null
AuthName "SQL Admin login"
AuthType Basic
<Limit GET>
require valid-user
</Limit>

Can anyone give me any helpful suggestions?

(I apologise if this has been posted previously, I did do a search but nothing I found could help me with this)

Thanks,

David

jdMorgan

12:00 am on Feb 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Dyamar,

Welcome to WebmasterWorld [webmasterworld.com]!

I'll confess to avoiding password-related posts - They try my patience when debugging problems.

However, here are a few things you might want to check:

1) Make sure that your password file was created on the server you are using it on. You cannot copy a password file from another server, because the encryption "seed" will be different.

2) Make sure that the directory in which you have saved the password file is set to allow read access by whatever unix "user" the password process is created under.

3) Check your raw server error log to see if there is any indication of a problem in it.

Be advised that placing your "Require" directive inside a <Limit GET> container means that the password will only be required for GET requests, and not for POST, PUT, or DELETE, etc. This is probably not what you intend.

Jim