Skip to content

Instantly share code, notes, and snippets.

@elvisciotti
Last active December 11, 2015 10:18
Show Gist options
  • Save elvisciotti/4585713 to your computer and use it in GitHub Desktop.
Save elvisciotti/4585713 to your computer and use it in GitHub Desktop.
Instructions to create htaccess protected area with apache
# create an .htaccess file in the directory to protect
AuthUserFile /full/path/to/.htpasswd
AuthType Basic
AuthName "My Secret Folder"
Require valid-user
#create the password with this command
htpasswd -c /full/path/to/.htpasswd fred
# Now go to http://yourserver/protecteddir/ and insert username:fred, password (the one you inserted after the last command)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment