How to limit access to your website with apache2
From ThorstensHome
To get your apache2 protect a webpage with a password:
- have an unprotected webpage that shows up in your browser (I assume it is stored in /home/httpd/prot)
- create a .htpasswd file with htpasswd2
- create a file named .htaccess in /home/httpd/prot:
AuthType Basic AuthName "Restricted Files" AuthUserFile /home/httpd/prot/.htpasswd Require valid-user
- in your httpd.conf, replace all AllowOverride none with AllowOverride all. Read what AllowOverride is good for (www.google.com).

