热门

最新

红包

立Flag

投票

同城

我的

发布
lexoning
大数据的江湖
5 年前
truelexoning

感觉都是噱头,没啥用

元宇宙交流区
CSDN App 扫码分享
分享
评论
3
打赏
  • 复制链接
  • 举报
下一条:
1. 如果proxy_pass后面有斜杠。转发url为proxy_pass+原url匹配的location路径之后的内容。 例:原请求http://192.168.10.1/proxy/test.html, location 为/proxy/ proxy_pass为 http://127.0.0.1:81/abc/ 转发路径:(proxy_pass)http://127.0.0.1:81/abc/加上原请求部分路径test.html,最终路径http://127.0.0.1:81/abc/test.html 2. proxy_pass后面没有斜杠, a.只有当proxy_pass只有IP加端口,无路径时。匹配规则为proxy_pass替换原请求url的ip和端口, 同时保留了location路径。 location /proxy/ { proxy_pass http://127.0.0.1:81; } 会被代理到http://127.0.0.1:81/proxy/test.html b.当proxy_pass端口后包含路径时,匹配规则同1.
立即登录