Difference between revisions of "How to limit access to your website with apache2"
m (1 revision(s))
Latest revision as of 10:09, 18 October 2008
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).