Last active
May 17, 2017 17:15
-
-
Save fedir/6899180 to your computer and use it in GitHub Desktop.
Protection with .htpasswd / .htaccess
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AuthName "Password Protect Directory" | |
| AuthType Basic | |
| AuthUserFile /home/www/site/.htpasswd | |
| <Limit GET POST PUT> | |
| Require valid-user | |
| </Limit> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| htpasswd -c /home/www/site/.htpasswd username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Directory "/var/www/html"> | |
| AuthName "Password Protect Directory" | |
| AuthType Basic | |
| AuthUserFile /home/www/site/.htpasswd | |
| <Limit GET POST PUT> | |
| Require valid-user | |
| </Limit> | |
| </Directory> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AuthName "Password Protect Directory" | |
| AuthType Basic | |
| AuthUserFile /home/.htpasswd | |
| Require valid-user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment