Skip to content

Instantly share code, notes, and snippets.

@shoeshine
Created September 20, 2014 13:21
Show Gist options
  • Save shoeshine/e6d79c036c9a9c01fdf2 to your computer and use it in GitHub Desktop.
Save shoeshine/e6d79c036c9a9c01fdf2 to your computer and use it in GitHub Desktop.
# For STAGING SERVER ONLY...
# --------------------------
# --------------------------
# Developers add your IP Below
# DO NOT ADD Fuller IP's, however
# --------------------------
# --------------------------
# To set a u/p for everyone else,
# in command line on the server, type:
# htpasswd -c .htpasswd cliff
#
# Then, enter u/p to remember it
# User: myusername
# Pass: mypassword
AuthUserFile /server/path/to/.htpasswd
AuthName "Contact the webmaster for this password if you've forgotten it."
AuthType Basic
<Limit GET POST>
Require valid-user
Order Deny,Allow
Deny from all
Allow from localhost
Allow from your.ip.address # name it so you remember where this is from
Satisfy Any
</Limit>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment