Reputation: 457
I got this error message when configured SSL in nginx.
*15 peer closed connection in SSL handshake while SSL handshaking, client: 98.158.245.100, server: 0.0.0.0:443 Below is my SSL config file:
server {
listen 443 ssl;
server_name mydomain.cn;
ssl_certificate D:/Applications/nginx-1.15.6/ssl/esign/mydomain.pem;
ssl_certificate_key D:/Applications/nginx-1.15.6/ssl/esign/mydomain.key;
proxy_ssl_server_name on;
proxy_ssl_session_reuse off;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_protocols TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
default_type 'text/html';
location / {
proxy_pass https://153.152.123.492;
}
}
Upvotes: 0
Views: 8910
Reputation: 1055
check if your upstream server has the certificate as well.
check the clients protocols because you provide support only for TLSv1.2 pass some more headers to your upstream
try
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
try adding support for http2 to eliminate continues handshaking if nginx was compiled with it, like so
listen 443 ssl http2;
it would be helpfull though looking at your upstream logs as well, maybe for a 502
Upvotes: 1