实现访问nginx ip:80指定到 IP1:80业务,访问nginx ip:81指定到 IP2:80业务
1条回答 默认 最新
qlanto 2020-11-05 15:22关注server { location ^~ /上下文路径 { proxy_pass http://ip:81/上下文路径/; proxy_set_header Host ip; #proxy_set_header X-Real-IP $remote_addr; #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }具体可以参考我这篇博文https://blog.csdn.net/qq_44382452/article/details/105313852
解决 无用评论 打赏 举报