Last active
August 29, 2015 14:01
-
-
Save hfknight/decfc1e5934b350b8389 to your computer and use it in GitHub Desktop.
Apache HTTP Server: password authentication
This file contains 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
1. htpasswd -c /usr/local/apache/passwd/passwords <username1> | |
htpasswd /usr/local/apache/passwd/passwords <username12> | |
2. httpd.conf, add the following inside <Directory ....> section | |
AuthType Basic | |
AuthName "<Authentication Realm>" | |
# (Following line optional) | |
AuthBasicProvider file | |
AuthUserFile /usr/local/apache/passwd/passwords | |
#Require user <username> | |
Require valid-user #multiple users |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment