httpd2.2 (CENTOS6) Configuration authentication Landing page, based on document authentication (basic), virtual host-specific configuration and built-in status page configuration

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) using HTPASSWD command to manage

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: Each row defines a group 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>

Third, the built-in status page:

Can be placed within a single virtual host to query for individual virtual host status

<Location/server-status>

SetHandler Server-status

Order Deny,allow

Deny from all

Allow from 172.16

</Location>

#ExtendedStatus on extended built-in status page, closed by default

httpd2.2 (CENTOS6) Configuration authentication Landing page, based on document authentication (basic), virtual host-specific configuration and built-in status page configuration

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.