Forum Moderators: phranque

Message Too Old, No Replies

.htpasswd giving me trouble

It just keeps prompting for the password, even when it's entered correctly.

         

Ernos

5:35 pm on Jul 14, 2003 (gmt 0)

10+ Year Member



I searched the forums for any topics about .htpasswd, and while I found several that touched on it, I didn't find a solution to the problem I'm having here. I hope someone can help me out (bearing in mind, I'm still a newbie when it comes to this stuff).

I set up an .htaccess file in the directory I want to protect, it looks like this:


AuthUserFile /services/webpages/m/y/mysite.com/public/.htpasswd
AuthGroupFile /dev/null
AuthName "Restricted Area"
AuthType Basic

require user testing

I set up the .htpasswd in the root directory (above the directory that's Web-accessible), it looks like this:


testing:956xkFuvbOmIw

When I go to a page in the directory that I wanted protected, the box pops up asking for the password, but when I type in the correct password the box just pops up again. When I finally hit cancel, the 401 page comes up: "Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required."

Does this mean I put the .htpasswd file in the wrong directory somehow? I've tried moving it to a couple of other directories, just in case, but I haven't yet been able to get it to work. Can anyone shed light on this for me?

hakre

5:42 pm on Jul 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



have you create the password crypt on the same system where the webserver is? if not, try this.

Ernos

5:52 pm on Jul 14, 2003 (gmt 0)

10+ Year Member



I'm afraid I have no idea how. I used one of those online forms where you enter the username and password and it encrypts the password for you. Hmm.

hakre

5:59 pm on Jul 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i know that some of these form will produce bull**** for a specific server version but don't ask me about details. try another one maybe then.

or take a look in the apache bin folder, there should be a tool available to do the encryption.