ngx_http_proxy_connect_module icon indicating copy to clipboard operation
ngx_http_proxy_connect_module copied to clipboard

access proxy error

Open StandNorthStar opened this issue 3 years ago • 1 comments

  1. nginx config :
    server { charset utf-8; listen 8443; server_name open.work.weixin.qq.com resolver 119.29.29.29; proxy_connect; proxy_connect_allow 443;
    proxy_connect_timeout 10s; proxy_connect_read_timeout 10s; proxy_connect_send_timeout 10s; location / { access_log logs/access-8443.log main; error_log logs/error-8443.log; proxy_pass https://open.work.weixin.qq.com; } }

  2. test curl https://open.work.weixin.qq.com -I HTTP/1.1 200 Connection established

HTTP/1.1 200 OK Server: nginx Date: Mon, 21 Feb 2022 07:44:17 GMT Content-Type: text/html; charset=utf-8 Content-Length: 109280 Connection: keep-alive Vary: Accept-Encoding Set-Cookie: wwrtx.ref=direct; Domain=.work.weixin.qq.com; Path=/; HttpOnly Set-Cookie: wwrtx.i18n_lan=zh; Domain=.work.weixin.qq.com; Path=/; Expires=Wed, 23 Mar 2022 07:44:16 GMT ETag: W/"1aae0-PUoSNccHrH7rWMSEvH8q0Qm7oFQ"

curl -H "Host: open.work.weixin.qq.com" localhost:8443

but access nginx ,error !

  1. error logs :
    2022/02/21 15:38:00 [error] 1860#1860: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: open.work.weixin.qq.com, request: "GET / HTTP/1.1", upstream: "https://127.189.1.129:443/", host: "open.work.weixin.qq.com" 2022/02/21 15:38:00 [error] 1860#1860: *4 connect() to [fd00:696e:6974:6578::65:182]:443 failed (101: Network is unreachable) while connecting to upstream, client: 127.0.0.1, server: open.work.weixin.qq.com, request: "GET / HTTP/1.1", upstream: "https://[fd00:696e:6974:6578::65:182]:443/", host: "open.work.weixin.qq.com"

Please what is the reason for this ?

StandNorthStar avatar Feb 21 '22 07:02 StandNorthStar

resolver 119.29.29.29 ipv6=off;

disappointed72 avatar Feb 21 '22 07:02 disappointed72

think it resolved. feel free to reopen if u still have the same problem

chobits avatar Aug 18 '22 09:08 chobits