Apache .htaccess and .htpasswd Error

Discussion in 'Windows Desktop Systems' started by lieb39, May 4, 2003.

  1. lieb39

    lieb39 Apple lover, PC User

    Messages:
    526
    Location:
    Australia
    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:

    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. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    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
     
  3. lieb39

    lieb39 Apple lover, PC User

    Messages:
    526
    Location:
    Australia
    Does apache keep a log of all the errors? Where would it be located in a linux enviroment?
     
  4. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    wherever apache is installed, in a sub-dir /docs/error.log
     
  5. lieb39

    lieb39 Apple lover, PC User

    Messages:
    526
    Location:
    Australia
    I finally got it to work. Wasn't easy, but the path if I was in WS_FTP was:
    than I would put this into .htaccess file
    Thanks.
     
  6. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Oooh chrooted. :)