Apache .htaccess and .htpasswd Error

lieb39

Apple lover, PC User
Joined
27 Nov 2002
Messages
526
Hello.

I have been using apache for a while now, both locally and on a server I owe with a friend. Locally on my network, I can get .htaccess and .htpasswd to work (I have apache on a networked win nt 4 server computer) But when I try to get it to work on my server on the web I can't. It seems that I can't figure out the path the the password file on the server, since it's running Linux I believe and it's got the weird /home and stuff. My .htaccess file is:

AuthUserFile /home/dan/public_html/download/.htpasswd
AuthName "Daniel's Private Files - lieb39 access only"
AuthType Basic
require valid-user

And my .htpasswd file is just the username and password encoded in md5 (or whatever, not sure of the exalt type of protection)

Now, when I am in WS_FTP and I log onto the server and into the directory I want to password protect WS_FTP locates it as: " /home/dan/public_html/download/ " So I assume the password file is located in " /home/dan/public_html/download/.htpasswd " as my password file is called " .htpasswd ".

For some reason, I get the password prompt but no matter what, I can't get it. It says my password and/or username is wrong.

Just for your infomation my website I am trying to password protect is located here.

Please help!

Thanks,

lieb39
 
if you are putting it in your home directory or a path within your home then you can use

~/path/to/file/here

the ~ directs it to your home dir
if you can SSH or something then type pwd and use that path

pwd gives you the present working directory
 
Does apache keep a log of all the errors? Where would it be located in a linux enviroment?
 
wherever apache is installed, in a sub-dir /docs/error.log
 
I finally got it to work. Wasn't easy, but the path if I was in WS_FTP was:
/home/dan/public_html/download/.htpasswd
than I would put this into .htaccess file
/home/virtual/site4/fst/home/dan/public_html/download/.htpasswd

Thanks.
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back