Skip to content

Instantly share code, notes, and snippets.

@unfulvio
Created June 12, 2013 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unfulvio/5762438 to your computer and use it in GitHub Desktop.
Save unfulvio/5762438 to your computer and use it in GitHub Desktop.
Protect a website folder (or root) with http password using .htaccess and .htpasswd
AuthUserFile /local/path/.htpasswd
AuthType Basic
AuthName "Insert a message here"
Require valid-user
user:password(md5)
@unfulvio
Copy link
Author

replace /local/path/ with the server local path to .htpasswd file
in htpasswd one user (and related password) can be defined per line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment