• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Apache .htaccess and .htpasswd Error

lieb39

Apple lover, PC User
#1
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
 
#2
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
 

Members online

No members online now.

Latest posts

Latest profile posts

Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,015
Latest member
evaiwhitis