htpasswd setup notes

Snippet
Create htpasswd file to store passwords:
 
% cd sites/example.com/passwords
% htpasswd -c htpasswdfile username
 
alternately, add a user to an existing file
 
% htpasswd htpasswdfile username2
 
Update the apache configuration file, or adjust the .htaccess file if desired.
 
...
   <Directory /sites/example.com/hostname/website>
     Options FollowSymLinks MultiViews -Indexes
     order deny,allow
     AllowOverride All
     AuthType Basic
     AuthUserFile /sites/example.com/passwords/htpasswdfile
     AuthName "Please enter user name and password"
     Require valid-user
   </Directory>
...