Tutorials

cPanel :: htpasswd to protection directory using htaccess

:: How to protect directory in cPanel
0. Login in cPanel
1. Go to “Password Protect Directories”
2. Select folder want to protect in “Please select the folder you wish to protect by clicking on its name”
3. Check “Password protect this directory” in Security Settings
4. Create user and password for protect directory
5. Create .htaccess file in secret folder and add these lines like:

AuthName "Login"
AuthUserFile /home/username/.htpasswds/public_html/folder_name_want_to_protect/passwd
AuthType Basic
require valid-user

6. Testing the configuration using web browser

 
:: Links
+ Google
+ Register

Hi, I’m Sysadmin.ID

Leave a Reply

Your email address will not be published. Required fields are marked *