How to resolve Nginx “proxy_pass 502 Bad Gateway” error

前端 未结 3 2087
眼角桃花
眼角桃花 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 17:08

    Had similar problem with proxy_pass, if your Linux server is using SELINUX then you may want to try this.

    $ setsebool -P httpd_can_network_connect true
    

    Refer to Warren's answer: https://unix.stackexchange.com/questions/196907/proxy-nginx-shows-a-bad-gateway-error

提交回复
热议问题