Modifying HAProxy with a HTTPS setup in addition to HTTP

June 29, 2014 1.8k views


I’ve read this great tutorial ( and have got it working nicely for HTTP, but not for HTTPS which has been implemented in the latest version of HAProxy.

Does anyone have a working solution to share?

Thanks in advance!

1 Answer

You need to add a second bind directive to your HAProxy frontend:

bind :443 ssl crt /path/to/site.pem

The PEM file can be created by copying the contents of the certificate and then the key into it, like this:

cat site.crt site.key > site.pem
Have another answer? Share your knowledge.