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