1. create a .htaccess file See format in NetSoD This file must be located in the directory that needs to be protected. 2. use htpasswd to create a user name and password htpasswd -c .passwd user_name .passwd is the password file where the password is stored in encrypted fashion. This file must be located in the directory that is specified in .htaccess.