Convert your SSL certificate to a production-ready HAProxy frontend configuration.
This tool converts your SSL certificate (PEM format or PFX/PKCS12) into a production-ready HAProxy frontend configuration. It follows the Mozilla Server Side TLS guidelines — the same standards used by SSL Labs to grade servers.
HAProxy uses a combined PEM file containing both the certificate and private key. The generated config includes bind directives, SSL protocols, cipher suites, OCSP stapling, HSTS headers, and HTTP to HTTPS redirect.
haproxy -sf $(cat /var/run/haproxy.pid) -f /etc/haproxy/haproxy.cfghaproxy -c -f /etc/haproxy/haproxy.cfg/etc/haproxy/certs/ with restrictive permissions.ssl
Enables SSL/TLS on the bind line. Used with crt parameter to specify the certificate file.
crt
Path to the combined PEM file (cert + key). The file must contain both in one file.
ssl-min-ver / ssl-max-ver
Specifies min and max TLS versions. Modern: ssl-min-ver TLSv1.3. Intermediate: ssl-min-ver TLSv1.2.
ssl-default-bind-ciphers / ssl-default-bind-options
Global cipher suite and options. Set in the global section for all frontends.
HAProxy requires a combined PEM file containing both the certificate and private key concatenated together. Use this tool to generate the combined file from your PEM or PFX certificate.
Concatenate the certificate and private key: cat cert.pem key.pem > combined.pem. Or simply use this tool — it generates the combined file automatically.
Run haproxy -c to validate the config, then haproxy -sf $(cat /var/run/haproxy.pid) -f /etc/haproxy/haproxy.cfg to gracefully reload.