Apache order allow deny

Source: Internet
Author: User

This thing is really easy to confuse us. In fact, it is not difficult, as long as you master such a rule can:
Let's start with an example:

Order Deny,allow
Deny from all
Allow from 127.0.0.1

The basis of our judgment is this:
1. Look at the back of the order, which is in front, which is behind
2. If deny is in front, then you need to see the deny from this sentence, and then see the
3. The rule is a matching one, whether deny before or allow before, will be effective. For example, deny all first, then allow 127.0.0.1, so 127.0.0.1 is passed.

Let's take a few more examples:

Order Allow,deny
Deny from all
Allow from 127.0.0.1

This will deny all, 127.0.0.1 will also be denied. Because the order is allow then deny, although the first allow 127.0.0.1, but later rejected it.

Order Allow,deny
Deny from all

All of them are impassable.

Order Deny,allow
Deny from all

All of them are impassable.

Order Deny,allow

All can pass (default), remember to

Order Allow,deny

All are impassable (default), remember to

Apache order allow deny

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.