Trouble Configuring SSL Termination with HAProxy

Hello

I am facing difficulties setting up SSL termination for my HAProxy instance and need some assistance. :upside_down_face: The issue arises when I try to serve HTTPS traffic through HAProxy while forwarding requests to backend servers using HTTP. Despite following several guides, the SSL handshake seems to fail, and I get browser errors indicating that the connection isnā€™t secure.

Hereā€™s my setup:

  • HAProxy is running on a Ubuntu 22.04 server.
  • Iā€™ve installed a Letā€™s Encrypt SSL certificate, and the .pem file is placed in the correct directory.
  • Frontend is configured to listen on port 443 with the SSL certificate. Backend servers are running HTTP on port 80.

Below is a snippet of my configuration file:

frontend https_front
bind *:443 ssl crt /etc/haproxy/certs/certificate.pem
default_backend http_back

backend http_back
server server1 192.168.1.10:80 check

Whenever I attempt to access the site, the browser throws a ā€œSSL_PROTOCOL_ERRORā€ or ā€œERR_SSL_HANDSHAKE_FAILUREā€ message. Iā€™ve ensured that the certificate is valid and not expired. Additionally, I checked the HAProxy logs, but there arenā€™t any clear error messages indicating what might be going wrong. :upside_down_face: Checked HAProxy SSL Termination (Offloading) Everything to Know Okta documentation guide for reference .

Can someone help me identify the potential misconfiguration or steps I might have missed? :thinking: Any tips on debugging SSL issues with HAProxy would also be greatly appreciated!

Thank you ! :slightly_smiling_face: