Skip to content

Instantly share code, notes, and snippets.

@Asikur22
Created April 10, 2019 17:28
Show Gist options
  • Save Asikur22/645a2dd3e9955311792d50576cb0b22e to your computer and use it in GitHub Desktop.
Save Asikur22/645a2dd3e9955311792d50576cb0b22e to your computer and use it in GitHub Desktop.
[Password Protect Folder with Apache .htaccess file]
##Create new file named “.htaccess” in the folder with this Content
AuthName "Password Protected!"
AuthType Basic
AuthUserFile /home/cpanel_user_name/public_html/folder_name/.htpasswd
require valid-user
##Create new file named “.htpasswd” in the same folder with this Content (Username:Password)
asiq:12345
##*Change cpanel_user_name & folder_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment