linux:apache2_htaccess
Apache htaccess
This is valid for Apache2.
Example of a .htaccess file
AuthName "Restricted Area" Authtype Basic AuthUserFile /home/priv_mikkel/public_html/mikkelbundgaard/download/.htpasswd require valid-user
Define passwd file
Prompts for password
$ htpasswd -c .htpasswd <username>
Create htpasswd file with password from shell
$ htpasswd -bc .htpasswd <username> <password>
ā-cā creates new file