【发布时间】:2017-02-28 15:28:21
【问题描述】:
Nginx 配置是全新的 Noob。我正在尝试基于 IP 限制 http 请求:这是我目前所拥有的:我需要允许所有 GET,但是我需要将 PUT DELETE 和 POST 限制为特定的 IP 范围
location / {
index app.php index.php index.html;
try_files $uri @rewriteapp;
limit_except GET {
allow all;
}
limit_except PUT DELETE POST {
allow <IP SUBNET 1>;
allow <IP SUBNET 2>;
deny all;
}
知道我做错了什么吗?有没有可能?
【问题讨论】: