Search This Blog

Thursday, September 1, 2011

Simple Password Protect with Apache

Apache offers a simple way to protect your web server directory.
you will need two files:
.htpasswd (this is your username and password file)
.htaccess (put this on the directory you want to protect)

htpasswd -c .htpasswd pick_a_user_name
create a

AuthType Basic
AuthName "your popup messages"
AuthUserFile /path/to/your/.htpasswd
Require user the_user_name_you_pick

done !

No comments: