Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: Password Protect/.htaccess

  1. #21
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    when you made the htpasswd file with the htpasswd command, you made it htpasswd not .htpasswd right? So I think this will work for you .htaccess file

    Code:
    AuthType Basic
    AuthName "Restricted Files"
    AuthUserFile c:/Program Files/Apache Group/Apache2/auth/htpasswd
    Require user philman213
    and if you made the file .htpasswd you would simply use
    Code:
    AuthType Basic
    AuthName "Restricted Files"
    AuthUserFile c:/Program Files/Apache Group/Apache2/auth/.htpasswd
    Require user philman213
    to see which one you used just open up my computer and navigate to that directory and it will either have a . or not. Hope this finally gets it working.

  2. #22
    Member
    Join Date
    Apr 2004
    Posts
    91
    I found a error that I made, in .htaccess I directed it to .htpasswd, when it was always htpasswd (without the period). But still, I get the same error. After trying C:/... and C:\... I still get the error. I check my error log and this is what it has to say:

    [Fri Sep 24 14:39:11 2004] [alert] [client **.***.***.***] C:/Program Files/Apache Group/Apache2/htdocs/*******/.htaccess: AuthUserFile takes 1-2 arguments, text file containing user IDs and passwords, referer: http://www.*************.com/***********

  3. #23
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    Your passwords file does not need to be called .htpasswd, you can call it wibble.txt if you like (but ensure it is not downloadable by the web server).

    I normally call it htpasswd or htpasswords and store it outside of the web root. Putting the fullstop in front just makes it hidden in Unix, which is really superfluous.

    As ever, check the error log if there is an error - only change one thing at once.

    You will need an AuthType directive, and also a Require directive - make sure they're there.

    Slarty

  4. #24
    Member
    Join Date
    Apr 2004
    Posts
    91
    I guess you didnt read or I didnt say but my htaccess is identical to the one on the apache site except I have the feilds correct.

  5. #25
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    I think the space in your .htaccess file is screwing it up. I'm thinking it's seeing stuff after the space as a second parameter. Try putting quotes around it. If that doesn't work search around for a solution. Peace.

  6. #26
    Member
    Join Date
    Apr 2004
    Posts
    91
    I fixed it. Thanks anyway. Apparently I had to add quotes on the C:\ when I was told by many people not too :-O

Posting Permissions

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