Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    New to the CF scene
    Join Date
    Aug 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Path to my htaccess file, plz !

    Hello there,

    I am quite new to this htaccess stuff. I am trying to protect my website with this system. I have put the htaccess file in my "member" folder. So obviously the path to my htpasswd file would be : /web/member/.htpasswd
    At least that's what I write in my htaccess file and it is not working. The password window pops up all the time and finally says it has not found the credentials bla bla bla.... (in my passwd file it is written usernameassword). I also set the CHMOD to 755.
    I assume it is a wrong path name. Can someone please help me what path I should write in my htaccess file ?
    Here are some info about my FTP, when I log in it says about UNIX and I transfer in ASCII.
    Thanks for your future answer, if anybody is willing to help it would be so nice...
    Take care
    Thomas

  • #2
    New to the CF scene
    Join Date
    Aug 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Why is this smiley in the middle of my text ????
    Sorry for that....

  • #3
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    I believe you need the specify the absolute path the the file.

    Also to remove smilies from a post if you hit edit on of the 4 checkboxes under "Options" should say "Disabled Smilies in This Post"
    OracleGuy

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    http://www.javascriptkit.com/howto/htaccess3.shtml

    See in the example how it has the full path to the .htpasswd file?
    OracleGuy

  • #5
    New to the CF scene
    Join Date
    Aug 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your reply Oracleguy. Actually I must have read this tutorial you are mentioning to me about 30 times. As well as all the threads that contain the word htaccess in this forum, before I considered posting. But still... I must be some kind of slower to understand or whatever.
    Back to my problem...
    This is an example of a full path like in the tutorial :

    AuthUserFile /usr/local/you/safedir/.htpasswd

    I am already stuck here as my htpasswd is in my /web/member folder. And before my /web folder there is nothing. So why would I go into my usr folder which on the tree is on the same level as my web folder. So maybe I did not get something here, I miss the point or what. So I still need help to find the absolute path. If you, oracleguy, have a paypal account and are willing to help me out with this I would be more than glad to pay for it. Don't get me wrong about this, it is just that my website is closed since 3 weeks because I can't protect this member section. Thanks again for your time....
    Take care

  • #6
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    So the web folder is in the top level of the directory tree?

    If so then /web/member/.htpasswd should work.

    If not try web/member/.htpasswd

    Tell me if either thing works.

    Also, is this your server or are you being hosted by someone else?
    Last edited by oracleguy; 08-24-2003 at 08:54 PM.
    OracleGuy

  • #7
    New to the CF scene
    Join Date
    Aug 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your reply...I just tried both solutions but none of them work, the pop-up windows just keeps asking for the password and after the 3rd time I got an error message (Authorization Required
    This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.)
    I am hosted at someone else's server, I had a chat with them already 2 weeks ago and they told me there is no problem using htaccess file.

    When I enter me@webftp.mysite.com
    The tree is vertically arranged like this :

    bin
    cgi-bin
    etc
    logs
    opt
    tmp
    usr
    var
    web
    And in the "web folder there is the "member" folder which I want to protect....
    I have read in another tutorial that the CHMOD should be set to 644, so I change it, but it still does not work....
    It seems quite incredible....

  • #8
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Now, what program are you using to generate the encrypted password for the .htpasswd file? I had a problem a while ago where I was using some site that supposedly had the feature to do it but it generated them wrong so the server kept rejecting the passwords.
    OracleGuy

  • #9
    New to the CF scene
    Join Date
    Aug 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Actually I am not using a encryption program.... I know it is not good, but it is not a must do, is it ? So I am just adding the users myself. Is this the problem ?

  • #10
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    You have encrypt the passwords in the list. Otherwise it won't be able to decrypt them when you visit the page and it is trying to compare the password you gave to the one in the .htpasswd file. I think that is where your problem lies. You probably had the path correct.

    The program to encrypt the passwords is free and distributed with Apache. If you don't have it, I'll email it to you when I get home.

    What you do is you enter the password into the program and it encrypts it using the MD5 encryption Apache uses and then lets you put the encrypted string into your .htpasswd file.
    OracleGuy

  • #11
    New to the CF scene
    Join Date
    Aug 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh, ok... so this was probably the problem ?? I feel.... stupid.
    Please email me this program, that would be so kind of you.
    My email adress is fcow at skynet dot be.
    Thanks again for your answer, it is really nice of you to take the time.
    Take care

  • #12
    New to the CF scene
    Join Date
    Aug 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Good news Oracleguy, it works. Actually I read the tutorial again to encrypt the passwords and it works now. Also the path to my htpasswd file was wrong, completely wrong. It is something like this :
    /mnt/mss-1/vol3/web/t/th/www.mysite.fr/web/ and so on...
    I want to thank you for your time and your help, because you helped me alot and it means very much to me as this website is extremely important to me...
    Thanks again and take care...
    Thomas


  • #13
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Yeah no problem.
    OracleGuy


  •  

    Posting Permissions

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