How to resolve Nginx “proxy_pass 502 Bad Gateway” error

前端 未结 3 2046
眼角桃花
眼角桃花 2021-01-18 16:07

I have trying to add proxy_set_header in my nginx.conf file. When I try to add proxy_pass and invoke the URL it throws 502 Bad Gateway nginx/1.11.1 error.

Not sure h

3条回答
  •  生来不讨喜
    2021-01-18 16:57

    502 is sent when your upstream is not reachable.

    Try to switch on error log and you might see failed to connect to upstream, for this you need to check whether your upstream server is running or not, sudo service upstream status, and try to switch that on.

提交回复
热议问题