How do you secure an nginx server's TLS and headers quickly?
BeginnerProductionTLS, Certificates & Network Security
Answer
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 1d;
ssl_session_tickets off;
ssl_stapling on; ssl_stapling_verify on;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Content-Type-Options nosniff always;
server_tokens off;
Validate with SSL Labs or testssl.sh and keep OpenSSL updated.
More on TLS, Certificates & Network Security
How do you manage certificates at scale without outages?IntermediateHow does cert-manager work in Kubernetes?IntermediateWhat is the best way to terminate TLS in AWS?IntermediateWhat is SPIFFE/SPIRE and why do platforms adopt it?IntermediateHow do you handle TLS configuration drift across many servers?IntermediateWhat are the risks of terminating TLS at the edge and sending plain HTTP internally?Advanced