Enable X25519MLKEM768 on Apache httpd
Apache gets post-quantum key exchange from the OpenSSL that mod_ssl links. With OpenSSL 3.5 or later, X25519MLKEM768 is in the default group list; you only need to make sure nothing narrows it.
Before you start
- Apache 2.4 with mod_ssl linked against OpenSSL 3.5 or later. Check the library:
ldd $(which httpd) | grep ssl, or your package manager (for exampleapk info libssl3). - TLS 1.3 allowed: post-quantum key exchange needs it.
Option 1: use OpenSSL's defaults (simplest)
- Look for a group or curve setting:
grep -rniE "SSLOpenSSLConfCmd +(Groups|Curves)|SSLECDHCurve" /etc/apache2 /etc/httpd /usr/local/apache2/conf. - Remove any line that leaves out X25519MLKEM768.
- Make sure TLS 1.3 is allowed:
SSLProtocol -all +TLSv1.2 +TLSv1.3
- Test and reload:
apachectl configtest && apachectl graceful.
Option 2: list the groups yourself
- In the virtual host (or the server config), set the group list with X25519MLKEM768 first:
SSLProtocol -all +TLSv1.2 +TLSv1.3
SSLOpenSSLConfCmd Groups X25519MLKEM768:X25519:prime256v1
- Test and reload:
apachectl configtest && apachectl graceful.
Keep X25519MLKEM768 first, or browsers that offer both get classical key exchange.
Then scan your domain below to check every host at once.