The easiest way to password protect your apache-based website is to use .htaccess. This utility will generate the correct files (.htaccess and .htpasswd) based on the user name and password you supply.
Just input the username and password you require, plus the exact path of the directory you want to protect.