Interview Prep/Networking/TLS and certificate errors

A backend behind nginx (`proxy_pass https://...`) fails with `upstream SSL certificate does not match "10.0.4.12"`.

IntermediateTroubleshootingTLS and certificate errors
Answer

Likely causes → proxy_ssl_verify on with proxy_pass to an IP or upstream name, and nginx isn't sending the right SNI / verifying against the right name.

Diagnose →

grep -n -E 'proxy_ssl|proxy_pass' /etc/nginx/conf.d/*.conf
tail -n 20 /var/log/nginx/error.log

Fix →

proxy_ssl_server_name on;
proxy_ssl_name backend.internal.example.com;
proxy_ssl_trusted_certificate /etc/nginx/ca.pem;
proxy_ssl_verify on;

Prevent → Use hostnames for TLS upstreams and keep verification on.

All Networking questions Roadmap: Networking for DevOps

More on TLS and certificate errors