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.

odd question

Discussion in 'General Discussion' started by echelon_xander, Apr 18, 2003.

  1. echelon_xander

    echelon_xander Registered

    Joined:
    Apr 18, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I'm trying to make my entire site password encrypted so that NOTHING on the site (not even the main index file). Cpanel won't let me do the password protection that comes with it on the whole site (like the whole public_html folder), so I set it up manually.

    Now, my question is:

    in the htpasswd file, I know that you set it up like:

    username : password

    but the password there is encrypted somehow and I don't know how to specify my password. Any ideas?

    Regards,
    Echelon
     
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Following Hormingo's post in another thread do the following


    pico /home/username/public_html/.htaccess

    Put the following in the file:

    AuthUserFile /home/username/public_html/.htpasswd
    AuthGroupFile /dev/null
    AuthName "MY SITE Login"
    AuthType Basic

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

    Hit Ctrl+X then Y and then Enter

    Then

    htpasswd -c /home/username/public_html/.htpasswd user
    (user is the name you want to create)
    enter your password
    enter your password again

    If you dont have htpasswd installed on your server you can go to http://www.euronet.nl/~arnow/htpasswd/ to generate one. Then just use pico to edit /home/username/public_html/.htpasswd and paste the line of text that the site gave you into it.

    htpasswd is generally in /usr/local/apache/bin
     
Loading...

Share This Page