您的位置:首页 > 运维架构 > Apache

apache2.2与2.4中的访问控制语句比较

2016-03-11 19:06 609 查看
【拒绝所有请求】

2.2配置:

Order deny,allow
Deny from all


2.4配置:

Require all denied


【允许所有请求】

Order deny,allow
Allow from all


2.4配置:
Require all granted


【允许example.org域访问所有主机,拒绝其他主机访问。】

2.2配置:

Order Deny,Allow
Deny from all
Allow from example.org


2.4配置:

Require host example.org


【允许其他主机访问,拒绝example.org域访问所有主机】

2.2配置:

Order Deny,Allow
Allow from all
Deny from example.org


2.4配置:

<RequireAll>
Require all granted
Require not host example.org
</RequireAll>


注:【**】无特别说明时代表注释
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: