Results 1 to 7 of 7

Thread: .htaccess password protect - GoDaddy

  1. #1
    rlhanson's Avatar
    rlhanson is offline Master Glow Jedi
    Join Date
    Aug 2007
    Location
    Chapman, Kansas
    Posts
    531

    Default .htaccess password protect - GoDaddy

    Okay -
    I have a web design client which hosts through GoDaddy. I need to create a password protected directory without having access to his account in GoDaddy.

    This is what GoDaddy's help says:

    To protect a directory in your hosting account with a password, in that directory, create an .htaccess file that contains the following:
    AuthUserFile /home/content/l/o/g/login_name/html/.htpasswd
    AuthGroupFile /dev/null
    AuthName EnterPassword
    AuthType Basic

    require valid-user

    Where "l," "o," and "g" are the first three letters of your hosting login and "login_name" is your full hosting login. For example, the hosting login "maynard" would translate to the following path:
    /home/content/m/a/y/maynard/html/.htpasswd

    The AuthUserFile describes where the Web server looks for the .htpasswd file. The .htpasswd file contains a list of users who have access to a protected directory and their hashed passwords. There are a number of tools available online to create .htpasswd files.
    I have the .htaccess in directory: /presentations/debt_comp and have this in the path (with the correct login info entered):
    /home/content/l/o/g/login_name/html/presentations/debt_comp/.htpasswd

    This is what I have for the .htpasswd file:
    guest:r91YIfI.laCMA

    I get the prompt, but when I enter in the user name and password - it doesn't authorize.

    Does anyone know what I am doing wrong?
    Thank you,
    Lynne Hanson
    RL Hanson-Online

  2. #2
    jmarcv's Avatar
    jmarcv is offline Cranky Coder
    Join Date
    Jan 2005
    Posts
    354

    Default

    Sure looks like all is well. How did you generate the .htpasswd file?
    Try this:
    it is test:test and works. Maybe your pass is bad?
    test:jkXISINVC5I.

    And you have all 5 lines in your .htaccess?


    Doesn't hurt to get the official docs, might reveal something?

    Apache module mod_auth
    Last edited by jmarcv; 01-26-2008 at 12:16 PM.

  3. #3
    jmarcv's Avatar
    jmarcv is offline Cranky Coder
    Join Date
    Jan 2005
    Posts
    354

    Default

    FYI - docs say this works too-might be worth a shot:

    AuthUserFile presentations/debt_comp/.htpasswd

    note absence of starting forward slash.

  4. #4
    rlhanson's Avatar
    rlhanson is offline Master Glow Jedi
    Join Date
    Aug 2007
    Location
    Chapman, Kansas
    Posts
    531

    Default

    Thanks John-Marc for your response. I ended up using this site and it's instructions:
    Ilisys Web Hosting - How do I password protect a directory on a Linux server?

    AND an echo file:
    PHP Code:
    <?
    echo __FILE__;
    ?>
    to verify my path. It seems to be working now.

    I didn't use it in the top level as the site above states as I don't even have access to that area but I did follow the instructions of saving both the .htaccess and .htpasswd files as .txt files and then renaming after upload.
    btw: Why would that matter?

    Thanks again - you are so helpful as usual!
    Thank you,
    Lynne Hanson
    RL Hanson-Online

  5. #5
    jmarcv's Avatar
    jmarcv is offline Cranky Coder
    Join Date
    Jan 2005
    Posts
    354

    Default

    I don't know, the docs on apache say:
    Make sure that the AuthUserFile is stored outside the document tree of the web-server; do not put it in the directory that it protects. Otherwise, clients may be able to download the AuthUserFile.
    That would lead one to believe it should have worked...

  6. #6
    GDHosting's Avatar
    GDHosting is offline Newbie
    Join Date
    Jan 2008
    Posts
    1

    Default Just an FYI...

    rlhanson- glad to hear things are working for you now.

    Even though you didn't have access to the account, we wanted to let you and any other thread seekers know that we now offer an easier way to password protect in lieu of .htaccess. It can now be done quickly and easily using the File Manager, if you have account access of course!

    For more information see the following link.

    Password Protection for Linux Shared Hosting

    Continued success to you!
    Alicia R.

  7. #7
    rlhanson's Avatar
    rlhanson is offline Master Glow Jedi
    Join Date
    Aug 2007
    Location
    Chapman, Kansas
    Posts
    531

    Default

    I actually had the 4 digit pin to obtain support and was on the phone with GoDaddy support personnel which told me that I would have to create it with the .htaccess file as it was a linux hosting and not a windows hosting account.

    Thanks though.
    Thank you,
    Lynne Hanson
    RL Hanson-Online

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14