nginx正向代理访问微信接口502错误, Unable to tunnel through proxy. Proxy returns \“HTTP/1.1 502 Bad Gateway\
nginx正向代理访问微信接口报错502,Unabletotunnelthroughproxy.Proxyreturns"HTTP/1.1502BadGateway\。在resolver后面加上ipv6=off(关闭ipv6即可)
·
问题:
nginx正向代理访问微信接口报错502, Unable to tunnel through proxy. Proxy returns "HTTP/1.1 502 Bad Gateway\
解决方法:
在resolver 后面加上ipv6=off (关闭ipv6即可)
server {
resolver 114.114.114.114 ipv6=off; #指定DNS服务器IP地址
listen 8981;
access_log /opt/nginx/logs/proxy/access.log;
error_log /opt/nginx/logs/proxy/error.log;
proxy_connect;
proxy_connect_allow 443 563;
proxy_connect_connect_timeout 10s;
proxy_connect_read_timeout 10s;
proxy_connect_send_timeout 10s;
location / {
#proxy_ssl_server_name on;
proxy_pass http://$host;
proxy_set_header Host $host;
}
}
}
更多推荐
已为社区贡献2条内容
所有评论(0)