Resolving 502 Bad Gateway Errors in Nginx Reverse Proxy Caused by Missing SNI Configuration
This article explains why Nginx reverse‑proxying to an HTTPS upstream can return a 502 Bad Gateway error when SNI is not sent, shows the relevant SSL handshake log, and provides a complete configuration example—including enabling proxy_ssl_server_name—to fix the issue and avoid reload‑related socket problems.