GKLBB

当你经历了暴风雨,你也就成为了暴风雨

导航

常见问题解决 --- 若依vue部署前后端 502 (Bad Gateway)

nginx配置文件中配置代理访问

这里配置的proxy_pass是后台接口的代理

location /prod-api/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080/; # 这里的8080是后台端口
}

posted on 2023-05-31 06:38  GKLBB  阅读(574)  评论(0)    收藏  举报