Two files need to be create: .htaccess and .htpasswd
I want to protect a folder call "test" (/usr/www/test)
user name: goodwill
Create a file called .htaccess, put it in /usr/www/test/ with these content
AuthName "Restricted area"
Create a file called .htpasswd that contents user name and encripted password ( using htaccess generator:http://tools.dynamicdrive.com/password/ ), then put this file in /usr/
EX: goodwill:.l6wTNxfoHj6U (encripted hackit)
Browse to you site to see if it work