Forum Moderators: phranque

Message Too Old, No Replies

.htaccess & .htpasswd are not working correctly.

         

Leys

6:39 am on Jan 7, 2004 (gmt 0)

10+ Year Member



Hi everyone!

I just have a small issue with my .htaccess and .htpasswd

I am just testing this so i made a test directory on my webserver and put the .htaccess and .htpasswd files in it.

I have entered that user auth is recuired. In .htpasswd i have entered that the username and pass are test.

But everytime i enter this it just prompts me for another login screen, like username/pass are wrong. But i aint so stupid to type test wrong? ;)

AllowOverride is set to all in my httpd.conf.

Anyone has a clue what is wrong?

I am using a windows 2000 server.

jdMorgan

7:01 am on Jan 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Leys,

Welcome to WebmasterWorld [webmasterworld.com]!

The contents of the .htpasswd file must be encrypted using a tool installed with your server. I'm not sure how this is supported on Win 2000, but generally, you have to have command-line access, type in the name of the account manager/password-creation utility, and then enter the username and password. The output is merged with the current contents of .htpasswd, enabling that 'account'.

Jim

Leys

7:04 am on Jan 7, 2004 (gmt 0)

10+ Year Member



Thanks!

I have tried that aswell.

But it is not working :(

dcrombie

10:16 am on Jan 7, 2004 (gmt 0)



Make sure that the path to the .htpasswd file as defined in the .htaccess file is correct. If it's not then you will get the behaviour you describe.

To be more secure you should also place the .htpasswd file (if possible) outside of the www-accessible tree. ie. if your website is at /home/yourname/public_html/* then the file should go at /home/yourname/.htpasswd

Leys

12:39 pm on Jan 7, 2004 (gmt 0)

10+ Year Member



the thing is.

I host a few sites for people and i allow them to use htaccess.

But the tricky part is. If they want to be able to use it they have to put:

D:/Apache/Apache2/htdocs/directory name/place of htpasswd/.htpasswd

Cant this be done differently?

Now they have to input D:/Apache/Apache2/htdocs.

Leys

1:20 pm on Jan 7, 2004 (gmt 0)

10+ Year Member



Ok i got this fixed.

thanks all!