Password Protect
From Novara Support Knowledgebase
To password protect a specific folder from your site, and ensure that no unauthorized user's can log into that folder, please follow the steps detailed below :
Note: This can be quite useful when used in conjunction with your Statistical analysis details as per AWstats and Webalizer.
1. Log into your control panel (https:cp.host.ie) and choose File Manager from the quick access panel.
Note: You can also generate the .htaccess and .htpass files on your local machine and upload them into the correct directories as specified below.
2. Browse to the folder that you want to protect - in this case we will choose our AWstats folder.
3. Once here we want to create a file called .htaccess and save the file in the AWstats directory. Below is what your .htaccess file should look like. Note that you will be replacing the line :
AuthUserFile /ftest.ie/.htpass
with
AuthUserFile /hsphere/local/home/[username]/.htpass
4. Now once this file is saved we want to create the file .htpass in your root directory. To do this we need to first generate the password that this file will need.
If you log into the novara support site - http://support.novara.ie and choose the resource option as below :
5. Select the HTPassword Generator. Enter the username and the password that you wish to use to access the specific folder of your site that you wish to protect and hit the generate button.
6. The output as above (in this case : test:6xl/NTU.VvYOc), needs to be entered into the .htpass file in your root directory as below :
Once this file is saved your .htaccess file details the folder to be protected (located in the folder you wish to protect) , which in turn retrieves the list of valid usernames and logins from the .htpass file located in your root directory.
7. Your folder is now protected from unauthorized viewing and you will need to enter your username and password to access the information. Also note that the same steps as above are taken to protect any folder that you wish to restrict access to.
NOTE: That once you have logged in(authenticated) to this protected folder and come back out and retry this protected folder using the same browser the login dialogue box may not appear as your login details could be cached in this browser, If you use a different browser which is accessing the file for the first time - you will get the login dialogue.







