Simple .htaccess protection: Difference between revisions
From D3xt3r01.tk
Jump to navigationJump to search
m Created page with '==WHY== Because I bet many of you that don't have knowledge about this kind of stuff wanted to know how is this done ... it's actually more simple than you think ! ==HOW== Put…' |
mNo edit summary |
||
Line 10: | Line 10: | ||
AuthType Basic | AuthType Basic | ||
AuthName "Password Required" | AuthName "Password Required" | ||
AuthUserFile .passwds | AuthUserFile /full/path/to/your/.passwds | ||
Require valid-user | Require valid-user | ||
</source> | </source> |
Latest revision as of 14:19, 8 December 2010
WHY
Because I bet many of you that don't have knowledge about this kind of stuff wanted to know how is this done ... it's actually more simple than you think !
HOW
Put this in a file named ".htaccess" in a directory you want to be protected.
AuthType Basic
AuthName "Password Required"
AuthUserFile /full/path/to/your/.passwds
Require valid-user
In the command line for the first user do this ( for all the other users you can drop the -c ) :
htpasswd -c .passwds dexter
#New password:
#Re-type new password:
#Adding password for user dexter