Client access control is done before the apache2.4 version, which is accessed using the Allow Deny Order command.

Source: Internet
Author: User

Client access control is done before the apache2.4 version, which is accessed with the Allow Deny Order directive, and the usage in version 2.4 is different from the previous version, as follows

    1. ################################################
    2. Configuration on the 2.2
    3. Order Deny,allow
    4. Deny from all
    5. Configuration on the 2.4
    6. Require all denied
    7. ################################################
    8. Configuration on the 2.2
    9. Order Allow,deny
    10. Allow from all
    11. Configuration on the 2.4
    12. Require all granted
    13. #################################################

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here are a few examples of configurations on version 2.4
1. Allow only hosts with IP 192.168.1.1 access

    1. <requireall>
    2. Require all granted
    3. Require IP 192.168.1.1
    4. </requireall>

2. Allow only host access to the 192.168.0.0/24 network

    1. <requireall>
    2. Require all granted
    3. Require IP 192.168.1.0/24
    4. </requireall>

3. Prohibit 192.168.1.2 host access, others are allowed to access,

    1. <requireall>
    2. Require all granted
    3. Require not IP 192.168.1.2
    4. </requireall>

4. Allow all Access,

    1. Require all granted
    2. Note, this can not be added container <RequireAll> ... </RequireAll>
    3. Directly, written in the <directory "" > .....</directory> inside is OK

5. Deny all Access,

    1. Require all denied

Official Document Http://httpd.apache.org/docs/2.4/howto/access.html

Client access control is done before the apache2.4 version, which is accessed using the Allow Deny Order command.

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.