I have a previous post which demonstrates how to add HTTP Authentication by .htaccess.
.htaccess – Setting Password For Your Web Folder
But if it does not work and shown the following error in the Apache error log
- /home/ykyuen/public_html/.htaccess: Invalid command ‘AuthUserFile’, perhaps misspelled or defined by a module not included in the server configuration