【发布时间】:2012-11-27 12:28:06
【问题描述】:
我正在尝试限制对某个管理页面的访问。 但是,我的 nginx.conf 中有以下配置:
server {
listen 80; ## listen for ipv4; this line is default and implied
root /var/www;
server_name asdf;
location / {
proxy_pass http://192.168.1.1:88/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
#location /server/administrator/ {
# allow 127.0.0.0/24;
# allow my.ip/32;
#}
}
一切都与这个配置一起工作,请求被传递到我的 apache2 监听端口 88。然而,当我从我的访问限制中删除 cmets 时,我的 index.php 正在被下载而不是被处理。也许有人以前见过这个?
【问题讨论】:
-
你能测试一下,哪个指令给你这个问题?我怀疑
/32是错误的。