So I decided to try to add Cloudflare proxy in front of my HAProxy setup. My HA Proxy setup is working perfectly using Let’s Encrypt certificates. I run two ports, 443 and 80 which just redirects to 443. What I did was to grab an origin certificate and then enabled proxy. I placed the origin certificate on haproxy and set that to the default on HAProxy. All seems good except that I’m getting a 526 error. I tried disabling the domain and checking the certificate. When I do that I get the origin certificate back. Looking at the log in haproxy I see an error saying ssl handshake failed from Cloudflare ips. But I can’t figure out why?
I did pause it. And my server is returning the origin certificate. I can pm it to you, but don’t want to post it publicly.
The part that’s confusing me is that the origin certificate is the one installed. I’m guessing it’s done sort of setting on the haproxy frontend, but I have no idea what. It works fine with the origin server and chrome (obviously the cert is invalid)… And it worked fine with the letsencrypt certificate. There is something about haproxy that isn’t working correctly.