Apache访问控制:<目录>之间的交互和命令/允许/拒绝目录>
Apache 的 Order/Allow/Deny 指令允许在
http://httpd.apache.org/docs/2.2/mod/ mod_authz_host.html#order 给出一个命令 - 允许和拒绝根据 Order 指令进行评估。
http://httpd.apache.org/docs/2.2/mod/ core.html#directory 给出了另一个顺序 -
其中哪一个优先?
考虑第一个订单,如果我们有“订单允许,拒绝”,则链接显示“首先,评估所有允许指令[...]接下来,评估所有拒绝指令。如果有任何匹配,则拒绝请求” - 确实这包括
Apache's Order/Allow/Deny directives are permitted within a <Directory> context. What happens when a set of these directives is present within a <Directory> for the current directory and within a <Directory> for a parent?
http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order gives an order - Allow and Deny are evaluated depending on the Order directive.
http://httpd.apache.org/docs/2.2/mod/core.html#directory gives another order - <Directory> directives are applied "shortest match first".
Which of these takes precedence?
Considering the first order, if we have "Order Allow, Deny", the link says "First, all Allow directives are evaluated [...] Next, all Deny directives are evaluated. If any matches, the request is rejected" - does this include Allow/Deny directives within <Directory> directives for parents? Does a Deny in a parent directory thus override an "Allow" in the current directory?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅对问题的评论。
See comment on question.