qsafe.sh
Scan
Theme

Fix guides

How to enable post-quantum TLS on Apache httpd

Checked · Official docs

Works with mod_ssl on OpenSSL 3.5+; on by default there unless the group list is overridden.

When Apache httpd faces the internet directly, it negotiates TLS with every visitor, so the change belongs in its TLS configuration. If a CDN or load balancer sits in front, fix that first: it is what visitors connect to. The hybrid falls back to classical X25519 for clients that don't support it, so turning it on doesn't break older browsers.

Turn on post-quantum key exchange

Run Apache on OpenSSL 3.5 or newer. This needs OpenSSL 3.5 or newer (check with openssl version, or nginx -V / httpd -V for what the server was built with). Debian 13, Ubuntu 25.10+, Alpine 3.22+ and Fedora 42+ ship it. Then make sure the group list includes the hybrid:

ssl.conf or the <VirtualHost *:443> block
SSLOpenSSLConfCmd Groups X25519MLKEM768:X25519:prime256v1

Prefer post-quantum over classical

Put the hybrid group first:

ssl.conf
SSLOpenSSLConfCmd Groups X25519MLKEM768:X25519:prime256v1

Enable TLS 1.3

Allow TLS 1.3:

ssl.conf
SSLProtocol -all +TLSv1.2 +TLSv1.3

Turn off TLS 1.0 and 1.1

Allow only TLS 1.2 and 1.3:

ssl.conf
SSLProtocol -all +TLSv1.2 +TLSv1.3

Use strong TLS 1.2 cipher suites

Use strong TLS 1.2 suites:

ssl.conf
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

Redirect HTTP to HTTPS

Redirect port 80 to HTTPS:

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

Send HSTS

Send HSTS (needs mod_headers):

<VirtualHost *:443> block
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"

Check that it worked

After you deploy, rescan your domain. A quantum-safe setup shows X25519MLKEM768 as the negotiated key exchange. From a terminal:

curl qsafe.sh/your-domain.com?fresh

Prefer to let an AI agent make the change? The qsafe-fix skill and the MCP server use this same guide. It's also available as JSON from /api/v1/fixes/apache.

Esc