Web / NGINX Interview questions
How is SSL/TLS termination configured in NGINX?
server { listen 443 ssl; server_name example.com; ssl_certificate /etc/nginx/ssl/example.com.crt; ssl_certificate_key /etc/nginx/ssl/example.com.key; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers HIGH:!aNULL:!MD5; location / { proxy_pass http://backend_app; } }
ssl_protocols and ssl_ciphers restrict the connection to modern, secure options, avoiding deprecated protocol versions like TLS 1.0/1.1. It's also common to add a second server block listening on port 80 that simply redirects all HTTP traffic to HTTPS, so plaintext connections never reach the application.
Certificates are frequently automated with tools like Certbot, which handle issuance and renewal from a free certificate authority and reload NGINX automatically once a new certificate is in place.
More Related questions...