Skip to content

Instantly share code, notes, and snippets.

@pauldonnelly
Created October 24, 2014 11:28
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 pauldonnelly/7a4f74af25aec570f764 to your computer and use it in GitHub Desktop.
Save pauldonnelly/7a4f74af25aec570f764 to your computer and use it in GitHub Desktop.
Create Password Protected Directory
Go to or Create Directory (mkdir DIRECTORY)
1. htpasswd -c .htpasswd USERNAME
2. Enter Password twice
3. Type pwd to get current path + Copy
4. Create or Open .htaccess file - nano .htaccess
5. Insert:
AuthUserFile path/in/point/3/.htpasswd
AuthType Basic
AuthName "Design Zoo Protect"
<Limit GET POST>
require valid-user
</Limit>
6.Go to directory and test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment