Last active
December 19, 2015 09:28
-
-
Save tamboer/5932759 to your computer and use it in GitHub Desktop.
apache .htaccess .htpasswd
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
| #.htaccess | |
| AuthName "Restricted Area" | |
| AuthType Basic | |
| AuthUserFile /var/www/path to /public_html/.htpasswd | |
| AuthGroupFile /dev/null | |
| require valid-user | |
| #.htpasswd | |
| username:decrypted pass | |
| FROM : http://stackoverflow.com/questions/4175707/adding-a-salt-to-htpasswd | |
| By default htpasswd uses the standard crypt function and thus passwords are already salted - note in this example that both users have the same password yet the hashes are different: | |
| simon@diablo:~$ htpasswd -b -c htpasswd simon abcd | |
| Adding password for user simon | |
| simon@diablo:~$ htpasswd -b htpasswd simon2 abcd | |
| Adding password for user simon2 | |
| simon@diablo:~$ cat htpasswd | |
| simon:NWvm/LCCxQ64E | |
| simon2:2I.LBzsRqULN6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment