
1 chenliang0571 2013 年 9 月 29 日 log里面有错误吗? |
2 t4st OP @chenliang0571 没有哦,我反复刷新 access.log 和 error.log ,都是空的。客户端返回的是 404 错误。 |
3 manhere 2013 年 9 月 29 日 记得location区里面是可以写 rewrite规则的: location / { rewrite "^/proxy/?url=(.+)$" http://$1 break; } |
4 shiny PRO location 什么时候可以匹配 Query_String 了?捕获的字符串可以在下文里使用 $1? 闻所未闻…… |
5 chenliang0571 2013 年 9 月 29 日 我知道这样应该可以。。 http://myserver/test.css?url=www.anotherserver location / { proxy_pass http://$arg_url; } |
6 est 2013 年 9 月 29 日 ^/proxy/?url=(.*)$ 这个正则来看,你试试 http://myserver/proxyurl=http://www.anotherserver/test.css |
7 dallaslu 2013 年 9 月 29 日 正则里面的问号是不是应该进行转义?譬如: ^/proxy/\?url=(.*)$ |
8 rrfeng 2013 年 9 月 29 日 这不是正向代理了么…… |
9 t4st OP 搞定啦~感谢以上回答的各位!~ |