【发布时间】:2016-08-10 01:57:05
【问题描述】:
我想要
1) 拒绝除10.1.1.1 之外的所有 IP 地址(来自浏览器)
2) 允许来自 android(或任何其他)设备的所有请求
我有以下 nginx 代码 sn-p,但它给出了错误
这里不允许使用“allow”指令
location / {
allow 10.1.1.1; //allow for this IP only and deny for all browser request
deny all;
if ($http_user_agent ~* "(android") { //allow for android user-agent for now
allow all; // allow access to all mobile users
}
.
.
.}
如何实现这一目标或任何替代方法?
【问题讨论】:
标签: php nginx configuration