go into the directory you want to access protect. run the command:
touch .htaccess
then edit that file so it looks like:
AuthUserFile /full/path/to/directory_to_be_protected/.htpasswd
AuthName "Authorization Required"
AuthType Basic
require valid-user
that's what should be in the .htaccess file.
then use this command for setting up the password for the first user.
(22:17:03) megaspaz: then run this command in the same directory:
/path_to_apache_install/bin/htpasswd -c ./.htpasswd <username>"
then you need to edit your httpd.conf file and add.
<Directory "/full/path/to/directory_to_be_protected">
AllowOverride AuthConfig
Options Indexes FollowSymLinks Includes
Order allow,deny
Allow from all
</Directory>