Skip to content

Instantly share code, notes, and snippets.

@ciaranmg
Created May 5, 2014 17:45
Show Gist options
  • Save ciaranmg/a7462774996c630c5f7d to your computer and use it in GitHub Desktop.
Save ciaranmg/a7462774996c630c5f7d to your computer and use it in GitHub Desktop.
Apache .htaccess Staging server Password Protection
#-- Staging Server Password -------------------------#
SetEnvIf Host yourstagingserver.com passreq
AuthType Basic
AuthName "Staging Server"
AuthUserFile /home/username/.htpasswd
Require valid-user
Order allow,deny
Allow from all
Deny from env=passreq
Satisfy any
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment