[nginx] 路径配置

2013-09-11 15:56:22 +08:00
 geew
没接触过nginx, 但是这个问题很奇怪
//配置如下
location ~ "^/(test2/app|test1|image|comment/\d+|user(/\w+))/?$" {
include /etc/nginx/proxy.conf;
proxy_pass_header Server;
proxy_set_header X-Scheme $scheme;
limit_except GET HEAD {
proxy_pass http://img_server;
}
proxy_pass http://app_server;
}

//结果是:

/image POST 方法能到img_server
/comment/34 POST 也能到img_server
-- test1和test2/app是新加的
/test1 和 test2/app POST都不能到img_server, 会到app_server

改了这个配置需要重启nginx吗? 重启了也没啥用, 是什么原因呢

谢谢了
1881 次点击
所在节点    问与答
3 条回复
geew
2013-09-11 16:45:32 +08:00
人呢? 来啊
geew
2013-09-12 09:47:22 +08:00
顶上去
geew
2013-09-13 09:21:30 +08:00
再顶

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/82077

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX