Home  >  Q&A  >  body text

File access control in apache httpd.conf

First list my apache configuration:

 Order Deny,Allow
 Deny from all
 Allow from 127.0.0.1
 Allow from localhost

There is another one like this:

 Order Allow,Deny
 Allow from localhost
 Allow from 127.0.0.1

It should mean that only 127.0.0.1 and localhost are allowed to access, but 403 is reported in wamp.

May I ask why this is? (I just want 127 and local to be accessible)

In the first solution, if Deny from all is removed, it can be accessed. But I don't understand why Deny from all doesn't work. Shouldn't you watch Allow in the end?

高洛峰高洛峰2713 days ago675

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-05-16 17:00:37

    Top-down matching!

    reply
    0
  • Cancelreply