Password Protect Files
Securing your data on CalicoHosting.com is easy.
Configuring .htpasswd and .htaccess to require secure authentication
- SSH into your CalicoHosting.com account with your favorite SSH program. We like Putty and Secure CRT.
- Navigate to the folder you want to protect (e.g. ...htdocs/securearea/) and type "nano .htaccess" (without the quotes)
- Your .htaccess file should look something like this:
AuthType Basic
AuthName "USERNAME"
(replace USERNAME with the username, in caps)
AuthUserFile /home/websites/yourdomain.com/.htpasswd
(replace yourdomain.com with...)
Require valid-user
- Save the file as .htaccess and navigate to the path specified in the third line of the .htaccess file you just created.
- Type "htpasswd -b .htpasswd username password" (without the quotes, replacing 'username' and 'password' with the desired login and passwd.
- With a browser, like FireFox, try to view a page in the now-password protected folder. If you enter the wrong authentication, you will be unable to view the page.
