admin 管理员组文章数量: 1184232
问题:
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;
}
}
}
本文标签: 接口 错误 unable tunnel nginx
版权声明:本文标题:nginx正向代理访问微信接口502错误, Unable to tunnel through proxy. Proxy returns “HTTP1.1 502 Bad Gateway 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1755028493a3062538.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论