Some clients get the wrong certificate (another site's) from a shared IP.
IntermediateTroubleshootingTLS and certificate errors
Answer
Likely causes → Clients that don't send SNI (very old clients, some health checkers, scripts using raw sockets) get the default server block's certificate. Or server_name doesn't match and nginx falls back to the default.
Diagnose →
openssl s_client -connect 203.0.113.10:443 </dev/null 2>/dev/null | openssl x509 -noout -subject # no SNI
openssl s_client -connect 203.0.113.10:443 -servername shop.example.com </dev/null 2>/dev/null | openssl x509 -noout -subject
Fix → Fix server_name, make the most important site the default_server, or upgrade clients to send SNI.
Prevent → Include a no-SNI check in synthetic monitoring if legacy clients matter.
More on TLS and certificate errors
`curl: (60) SSL certificate problem: certificate has expired`Beginner`curl: (60) SSL certificate problem: unable to get local issuer certificate`Beginner`SSL: no alternative certificate subject name matches target host name 'api.example.com'`Beginner`SSL routines::sslv3 alert handshake failure` from `openssl` or curl.IntermediatePython `requests` fails with `SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain`.BeginnerNode.js app logs `Error: unable to verify the first certificate` calling an internal API.Intermediate