昨天遇到一个问题,主机服务还没有转成https,但要转发给一个https地址,一直在报一个错
upstream server temporarily disabled while SSL handshaking to upstream, client: xxx.xxx.xxx.xxx, server: localhost
SSL_do_handshake() failed (SSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) while SSL handshaking to upstream, client: xxx.xxx.xxx.xxx, server: localhost, request: "POST /a-path/ HTTP/1.1"
从log看应该是协议的问题,就开始找解决办法,最终解决问题,我把方法贴出来
文章来源:https://www.toymoban.com/news/detail-625565.html
location /web {
proxy_pass https://static.xxxxx.com/h5/sdr/index.html;
proxy_set_header Host $proxy_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_ssl_session_reuse off;
proxy_ssl_server_name on;
proxy_ssl_name $proxy_host;
proxy_ssl_protocols TLSv1.2;
}
关键是 proxy_ssl_protocols 和 proxy_ssl_session_reuse文章来源地址https://www.toymoban.com/news/detail-625565.html
到了这里,关于Nginx 转发 SSL 的报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!