httpd2.2 (CENTOS6) Configuration Authentication landing page, document-based authentication (basic)

Source: Internet
Author: User

First, basic certification:


(1) Define a security domain
<directory "" >
Options None
AllowOverride None
AuthType Basic
AuthName "STRING"
AuthUserFile "/path/to/httpd_user_passwd_file"
Require User username1 UserName2 ...
</Directory>

Allow all users in the account file to log in to access:
Require Valid-user

(2) Provide account and password storage (text file)
Manage with the HTPASSWD command
htpasswd [Options] passwordfile username
-C: Automatically create passwordfile, so it should only be used when the first user is added;
-M:MD5 Encrypt user password;
-S:SHA1 Encrypt user password;
-D: Delete the specified user

(3) Implementation of group-based authentication
<directory "" >
Options None
AllowOverride None
AuthType Basic
AuthName "STRING"
AuthUserFile "/path/to/httpd_user_passwd_file"
AuthGroupFile "/path/to/httpd_group_file"
Require Group GROUP1 GROUP2 ...
</Directory>

To provide: User account files and group files;

Group files: Define a group for each row
Grp_name:user1 user2 User3 ...

Second, each virtual host has a dedicated configuration:

You can disable a central host: Comment DocumentRoot

<virtualhost "Ip:port" >

Severname

DocumentRoot ""

</VirtualHost>

Serveralias: Alias of the virtual host;

Errorlog

Customlog

<directory "" >

......

</Directory>

httpd2.2 (CENTOS6) Configuration Authentication landing page, document-based authentication (basic)

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.