Skip to content

Instantly share code, notes, and snippets.

@innesm4
Created July 8, 2014 08:43
Show Gist options
  • Save innesm4/982b651808971749bf3d to your computer and use it in GitHub Desktop.
Save innesm4/982b651808971749bf3d to your computer and use it in GitHub Desktop.
Password Protected website
# ----------------------------------------------------------------------
# Password protect server
# ----------------------------------------------------------------------
SetEnvIf Host DOMIANNAME.COM passreq
AuthType Basic
AuthName "Password Required"
AuthUserFile /srv/htpasswd/.htpasswd
Require valid-user
Order allow,deny
Allow from all
Deny from env=passreq
Satisfy any
username:$apr1$SALT$HASH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment