概述

Nginx需配置反向代理,但访问报错502状态码。

处理思路

查看nginx错误日志
2021/08/02 17:03:54 [error] 169#169: *153502 SSL_do_handshake() failed (SSL: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:SSL alert number 40) while SSL handshaking to upstream, client: 10.172.68.1, server: test.ym68.cc, request: "GET / HTTP/1.1", upstream: "https://104.26.9.99:443/", host: "test.ym68.cc"
修改配置文件

ym68.cc替换成后端域名

新增配置选项

proxy_ssl_server_name on;
proxy_ssl_name ym68.cc;
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;


分类: Nginx