Last active
April 22, 2020 17:03
-
-
Save bsnux/fcdba8f2b7be62f8b440bb21c68da010 to your computer and use it in GitHub Desktop.
Generate Apache MD5 enc file with openssl for basic HTTP auth
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
# Reference: https://www.nginx.com/resources/wiki/community/faq/#how-do-i-generate-an-htpasswd-file-without-having-apache-tools-installed | |
USER="alice" | |
PW="the_password" | |
printf "$USER:$(openssl passwd -apr1 $PW)\n" >> .htpasswd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment