Apache user authentication for further security of your Apache site, simply make a note.
1. Create the specified user and indicate the password.
[Email protected] apache2]# htpasswd-c/usr/local/apache2/passwords Renzhiyuan
New Password:
Re-type New Password:
Adding Password for user Renzhiyuan
[Email protected] apache2]#
2. Edit the http.conf configuration file
1.httpd.conf settings
...
Options None
AllowOverride authconfig//Turn on authentication function
AuthName "Apache Login"//display information to the user
AuthType Basic//authentication type
AUTHUSERFILE/XXX/.HTPASSWD//Specify user authentication file location, file name, path variable, hide better.
Require user Renzhiyuan XXX//Specify accessible users, who are non-system users of virtual users, can set multiple
Require Valid-user//.htpasswd is available to all users, this is Renzhiyuan
3. Restart Service
Service httpd Restart
4. Login Verification
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/87/24/wKioL1fWAcfB_IB0AACxaIICCB4659.png-wh_500x0-wm_3 -wmp_4-s_3785262432.png "title=" 1.png "alt=" Wkiol1fwacfb_ib0aacxaiiccb4659.png-wh_50 "/>
This article is from the "[email protected]" blog, please be sure to keep this source http://renzhiyuan.blog.51cto.com/10433137/1851837
Apache2.4 user Authentication Login notes!