Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Senior Member
    Join Date
    Jan 2005
    Location
    Sunshinebay
    Posts
    1,258

    Default htaccess-htpasswd error

    Hi all
    I'm trying to setup(temporarily) a login to a website I'm working on.
    I would like to use the above setup to do this. I have tried all sorts from changing the file locations and permissions and you name it...
    Here thye htaccess file
    Code:
    AuthType Basic
    AuthName "Restricted Area"
    AuthUserFile http://www.site.com/htacpw/.htpasswd
    Require valid-user
    here the htpasswd:
    Code:
    user:pw
    in the server log I get the following error:
    No such file or directory: Could not open password file: /etc/apache2/http:/www.site.com/htacpw/.htpasswd, referer: http://site.com/

    on the web browser it looks like this:
    Internal server error
    The server encountered an internal error or miscongiguration and was unable to complete your request.
    Would someone be able to give me a hand on this?
    Would be nice!

    Thanks

  2. #2
    Senior Member fred_fish's Avatar
    Join Date
    Sep 2009
    Posts
    1,997

    Default Re: htaccess-htpasswd error

    You have to put the actual path to the .htpasswd file so that apache can find it in the LOCAL filesystem, not the web address (and it definitely should not be accessible via the web...)
    Lay me down the long white line
    Leave the sirens far behind me
    Paint my name in black and gold
    My heart my flame my heart my road

  3. #3
    Senior Member
    Join Date
    Jan 2005
    Location
    Sunshinebay
    Posts
    1,258

    Default Re: htaccess-htpasswd error

    Thanks Fred
    I'll have another try(or two).

  4. #4
    Senior Member
    Join Date
    Jan 2005
    Location
    Sunshinebay
    Posts
    1,258

    Default Re: htaccess-htpasswd error

    It's like trying to get blood out of a stone, just a no go till now.
    Any suggestions which could help?

  5. #5
    Misc. User of PressF1 somebody's Avatar
    Join Date
    Dec 2004
    Posts
    5,198

    Default Re: htaccess-htpasswd error

    Quote Originally Posted by notechyet View Post
    It's like trying to get blood out of a stone, just a no go till now.
    Any suggestions which could help?
    Are you getting the same error message?

    Can you confirm whether you're storing the password in plaintext in the .htpasswd file?
    Any views expressed here are my own and do not necessarily represent the views of my employer or any affiliated 3rd party.

  6. #6
    Senior Member
    Join Date
    Jan 2005
    Location
    Sunshinebay
    Posts
    1,258

    Default Re: htaccess-htpasswd error

    Quote Originally Posted by somebody View Post
    Are you getting the same error message?

    Can you confirm whether you're storing the password in plaintext in the .htpasswd file?
    somebody
    I have followed as much as I understand this totorial and password creator seen here. My suspicion is that my path given for the .htpasswd file(AuthUserFile)is not correct.
    This is what I have as path:
    AuthUserFile /home/my site name.com/httpdocs/ENG/.htpasswd
    Have also tried to place the .htpasswd in the same folder as the .htaccess file

  7. #7
    Senior member Iantech's Avatar
    Join Date
    Jun 2011
    Location
    Christchurch
    Posts
    1,622

    Default Re: htaccess-htpasswd error

    I suspect it is your path also, depending what ftp editor you are using, you should be able to right click on the file and look at its properties and get the correct file location on the server, one I have on a clients site for example is:

    AuthUserFile /home/canterbu/public_html/newsletter/.htpasswd

    the "canterbu" is the user name, not its site.com name

  8. #8
    Senior Member
    Join Date
    Jan 2005
    Location
    Sunshinebay
    Posts
    1,258

    Default Re: htaccess-htpasswd error

    Quote Originally Posted by Iantech View Post
    I suspect it is your path also, depending what ftp editor you are using, you should be able to right click on the file and look at its properties and get the correct file location on the server, one I have on a clients site for example is:

    AuthUserFile /home/canterbu/public_html/newsletter/.htpasswd

    the "canterbu" is the user name, not its site.com name
    Iantech,thanks
    I will give a try later in the day.

  9. #9
    Senior Member
    Join Date
    Jan 2005
    Location
    Sunshinebay
    Posts
    1,258

    Default Re: htaccess-htpasswd error

    Iantech
    no matter what I did ,no success yet.
    Very,very frustrated.

  10. #10
    Senior Member
    Join Date
    Jan 2005
    Location
    Sunshinebay
    Posts
    1,258

    Default Re: htaccess-htpasswd error

    Just in case anyone else is looking for a solution;
    To find the path to the .htpasswd file for the htaccess file, I have found the following website which helped me perfectly(after long hours of searching and trying)
    See here
    the path is:
    /var/www/vhosts/website.com/httpdocs/filefolder/.htpasswd
    Last edited by notechyet; 05-07-2011 at 09:15 PM.

Similar Threads

  1. Apache Server .htaccess IP filtering
    By justinsg in forum PressF1
    Replies: 4
    Last Post: 18-01-2010, 07:52 AM
  2. htaccess hotlinking
    By Mike in forum PressF1
    Replies: 1
    Last Post: 10-12-2007, 12:02 PM
  3. encrypting htpasswd --passwords :help:
    By Morgenmuffel in forum PressF1
    Replies: 3
    Last Post: 26-06-2006, 05:37 PM
  4. htaccess/htpassword timeout
    By teszeract in forum PressF1
    Replies: 4
    Last Post: 31-03-2006, 11:25 AM
  5. .htaccess and .htpasswd files
    By superOman in forum PressF1
    Replies: 6
    Last Post: 25-09-2002, 06:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •