Pcornel
Web Infrastructure · Web Services

TLS

Cheat sheet · https://pcornel.dk/topic.php?topic=2879

Back to the Topic

Answer

TLS on a Linux web server encrypts HTTPS: the server presents its certificate and intermediate chain, negotiates TLS 1.2/1.3 and ciphers, and keeps the private key readable only by the server.

Remember

Serve the full chain (leaf + intermediates). Disable TLS 1.0/1.1. Renew certificates automatically (certbot timer) and reload the server after renewal. The key must match the certificate.

First checks

  • openssl s_client -connect <host>:443 -servername <name> — handshake and chain check
  • systemctl status nginx|apache2|httpd — web server state
  • nginx -t / apachectl configtest — configuration test
  • ss -ltnp | grep -E ':80|:443' — listening ports
  • curl -vI https://<name> — response, headers and TLS
  • tail -f /var/log/nginx/error.log — error log (or apache2/httpd)

Verify in this order

certificate and chain installed → key readable by the server → TLS handshake with SNI → client validates chain and name

Where it usually breaks

First mismatch in persistent intent → provider/parser/generator → kernel/userspace runtime → dependency/security context → logs/counters → consumer-visible read-back; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2879

Confirmation

Confirm action

Continue?