Apache2.4 user Authentication Login notes!

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.