htpasswd -c .htpasswd exampleuser
.htaccess:
AuthType Basic AuthName "Protected directory" AuthUserFile /full/path/to/.htpasswd Require valid-user