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 9 of 9

Thread: .htpasswd

  1. #1
    mcr
    mcr is offline
    New to the CF scene
    Join Date
    Apr 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    .htpasswd

    i am trying to get it to work on my website.

    i am using 1and1.com as my host.

    i want to protect a directory - www.thegdbgroup.com/protectedtraining

    just to test it, i put the htaccess file and htpasswd file in there

    but there is no password box when i go to the site.

    anyone can help?

    htacess file-
    <Directory protectedtraining>
    AuthType Basic
    AuthName "Memeber Login"
    AuthUserFile www.thegdbgroup.com\protectedtraining\.htpasswd
    Require valid-user or require user username </Directory>

    anyone can help?
    Last edited by mcr; 04-28-2008 at 09:07 PM.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    I think you are confused with the httpd.conf and htaccess syntaxes.
    See, http://home.golden.net/htaccess.html (you need to specify the full absolute path of the password file)
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Don't use Directory and make AuthUserFile absolute path. Also be sure your browser cache and authentification stored is clear.

    this can help you:

    http://www.apacheweek.com/features/userauth

    regards
    Last edited by oesxyl; 04-30-2008 at 07:11 PM.

  • #4
    mcr
    mcr is offline
    New to the CF scene
    Join Date
    Apr 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    ok i found the full path to my htpasswd file.
    so this is what i have.


    AuthName ?Restricted Area?
    AuthType Basic
    AuthUserFile \homepages\31\d195789388\protectedtraining\.htpasswd
    AuthGroupFile \dev\null
    require valid-user
    Options +Indexes

    it still does not work.

    someone help me.

    this is located at www.gdbgroup.biz/protectedtraining

  • #5
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by mcr View Post
    ok i found the full path to my htpasswd file.
    so this is what i have.

    AuthName ?Restricted Area?
    AuthType Basic
    AuthUserFile \homepages\31\d195789388\protectedtraining\.htpasswd
    AuthGroupFile \dev\null
    require valid-user
    Options +Indexes

    it still does not work.

    someone help me.

    this is located at www.gdbgroup.biz/protectedtraining
    why don't mention that you use a Microsoft-IIS server?
    the link I post is for Apache, I don't think this work for you.
    Unfortunately I can't help you. I'm sorry.

    regards

  • Users who have thanked oesxyl for this post:

    mcr (05-01-2008)

  • #6
    mcr
    mcr is offline
    New to the CF scene
    Join Date
    Apr 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by oesxyl View Post
    why don't mention that you use a Microsoft-IIS server?
    the link I post is for Apache, I don't think this work for you.
    Unfortunately I can't help you. I'm sorry.

    regards
    HAHA i didn't know the difference. My server will now be switched to linux hopefully it will work now

  • #7
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by mcr View Post
    HAHA i didn't know the difference. My server will now be switched to linux hopefully it will work now
    , in that case maybe I and the posted link could help,

    this are the settings for auth basic
    Code:
    AuthType Basic
    AuthName "the realm used in htpasswd"
    AuthUserFile /path/to/htpasswd
    require valid-user
    - on linux you must use / instead off \ in path
    - use what you need for realm and htpasswd path.
    - be sure you update/create htpasswd and is on the path you use in .htaccess

    regards

  • #8
    mcr
    mcr is offline
    New to the CF scene
    Join Date
    Apr 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    how do i delete this thread or edit it.

  • #9
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by mcr View Post
    how do i delete this thread or edit it.
    probably the moderators can help, I see that edit buttons are unavailable at this moment, probably the thread is closed.
    Let me know if I can help with something.

    Edit: I guess that I must edit some of my replays too, or maybe I'm wrong

    regards
    Last edited by oesxyl; 05-12-2008 at 07:03 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
    •