NGINX配置反向代理
代理之后路径:http://127.0.0.1/web/user/swagger-ui.html
代理之前路径:http://127.0.0.1:20106/user/swagger-ui.html
config代码
这段代码直接写在server内
location ^~/web/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:20106/;
}

3016

被折叠的 条评论
为什么被折叠?



