Skip to content

Instantly share code, notes, and snippets.

@gradosevic
Forked from neotohin-snippet/htpasswd
Created December 10, 2016 18:29
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 gradosevic/639ba15ba8ed99233d7aa75b18f482d8 to your computer and use it in GitHub Desktop.
Save gradosevic/639ba15ba8ed99233d7aa75b18f482d8 to your computer and use it in GitHub Desktop.
htpasswd
**INLCUDE htpasswd**
To generate .htpasswd:
htpasswd -c ./.htpasswd admin
Add this in .htaccess:
AuthUserFile /home/test/public_html/.htpasswd
AuthGroupFile /dev/null
AuthName "Development Branch"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment