tldrTLS
Colour theme

Example configs

Apache: Keep TLS 1.2, ECDSA and RSA, HSTS without subdomains

We have not run this one. It is built from the Apache documentation. Test it before you rely on it.

Needs Apache 2.4 with OpenSSL 3.5 or later, plus mod_ssl and mod_headers. Swap example.com and the paths for your own.

ServerTokens Prod

<VirtualHost *:80>
    ServerName example.com
    Redirect permanent / https://example.com/
</VirtualHost>

<VirtualHost *:443>
    ServerName example.com
    DocumentRoot /var/www/example.com

    SSLEngine on
    SSLCertificateFile    /etc/ssl/example.com/ecdsa/fullchain.pem
    SSLCertificateKeyFile /etc/ssl/example.com/ecdsa/privkey.pem
    SSLCertificateFile    /etc/ssl/example.com/rsa/fullchain.pem
    SSLCertificateKeyFile /etc/ssl/example.com/rsa/privkey.pem

    SSLProtocol -all +TLSv1.2 +TLSv1.3
    SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305
    SSLHonorCipherOrder off
    SSLOpenSSLConfCmd Groups X25519MLKEM768:X25519:secp384r1
    SSLSessionTickets off

    Header always set Strict-Transport-Security "max-age=63072000"
    Header always set X-Content-Type-Options "nosniff"
    Header always set Referrer-Policy "strict-origin-when-cross-origin"
</VirtualHost>

What it does

  • Accepts TLS 1.3 and TLS 1.2. On TLS 1.2 it allows only suites with forward secrecy and modern encryption. A TLS 1.2 connection gets no post-quantum protection. See protocol versions and cipher suites.
  • Offers the hybrid post-quantum group first, then X25519 and P-384. P-256 is not offered. See post-quantum key exchange.
  • Expects two certificates: ECDSA P-384, and RSA 3072 for clients that can't use ECDSA. See certificate strength.
  • Sends HSTS for this hostname only. Subdomains are not covered. See HSTS.
  • Turns session tickets off. Apache has no 0-RTT setting. See 0-RTT and session tickets.

What it leaves out

  • OCSP stapling. See revocation.
  • A Content-Security-Policy. It depends on what your pages load.
  • HTTP/3. We haven't tested it.

Check what you deployed

openssl s_client -connect example.com:443 -groups X25519MLKEM768 -brief </dev/null
weeb probe example.com --fix

The first should print Negotiated TLS1.3 group: X25519MLKEM768. The second (get weeb) should show TLS 1.0 and 1.1 as unavailable, and TLS 1.2 as offered.