nginx 反代 https 源站,为啥 upstream 源站变成 https://ip/XXX

2022-09-01 23:02:03 +08:00
 liuyinltemp

菜鸟求助,nginx 反代 https://AAA.com 页面打开为空,如果直接反代 http://AAA.com 则完全正常; 看错误代码

[error] 5790#5790: *15933 upstream prematurely closed connection while reading upstream, client: 127.0.0.1, server: m.shss.pw, request: "GET /bbs/index.php HTTP/2.0", upstream: "https://数字 IP:443/bbs/index.php", host: "BBB.com", referrer: "https:/BBB.com/"

https://AAA.com 是 ke 可以打开的,但是 https://数字 IP:443/ 显然是无法打开的,所以报错

请问这种情形下 nginx 如何修改配置?

2472 次点击
所在节点    NGINX
24 条回复
liuyinltemp
2022-09-04 23:27:42 +08:00
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
liuyinltemp
2022-09-04 23:28:17 +08:00
又查了一下,应该是 vps 下访问源站有问题,但是证书又是对的。
liuyinltemp
2022-09-05 09:44:59 +08:00
应该是源站的证书缺失了中间证书,这种情况有啥办法
liuyinltemp
2022-09-07 16:50:25 +08:00
源站补齐中间证书就好了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/877124

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX