The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cannot create password protected directory (htaccess)

Discussion in 'General Discussion' started by error_22, Aug 9, 2005.

  1. error_22

    error_22 Registered

    Joined:
    Aug 9, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    When Im password protect a directory nothing happens, I ahve done this many times on another server (also with cPanel) so I know I'm not doing any mistakes. What to do?

    Thanks in advance
    Niklas Garphult
     
  2. kekays

    kekays Active Member

    Joined:
    Nov 2, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0
    You can do this thru this shell. Create .htaccess file on which directry to you have to protect and put this contect in that location

    =================================
    AuthUserFile /home/username/public_html/somepath/.htpasswd
    AuthGroupFile /dev/null
    AuthName "Somewhere.com's Secret Section"
    AuthType Basic

    <Limit GET POST>
    require valid-user
    </Limit>
    =================================

    htpasswd -c /home/username/public_html/somepath/.htpasswd username

    Adding password for username.

    New password:

    password

    Re-type new password:

    password

    ===============================
     
Loading...

Share This Page