Nginx 转发 SSL 的报错
关键是 proxy_ssl_protocols 和 proxy_ssl_session_reuse。昨天遇到一个问题,主机服务还没有转成https,但要转发给一个https地址,一直在报一个错。从log看应该是协议的问题,就开始找解决办法,最终解决问题,我把方法贴出来。...
·
昨天遇到一个问题,主机服务还没有转成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看应该是协议的问题,就开始找解决办法,最终解决问题,我把方法贴出来
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
更多推荐
已为社区贡献13条内容
所有评论(0)