HAProxy community

Haproxy behind CloudFlare

Does anybody have a haproxy.cfg example using haproxy behind CloudFlare.?

What are you exactly looking for?

(I ask because putting HAProxy behind CloudFlare, without any additional requirements, should work without doing anything special.)

Using the built in SSL that CF provides is causing problems in Wordpress. I am most interested in seeing how to set up a listen configuration in haproxy.cfg

If you are encountering TLS issues with CloudFlare then you have only two options:

  • don’t use CloudFlare as a CDN, which basically means not using any of their caching and security issues; (thus only for DNS;)
  • fix the certificate issue, which most likely isn’t HAProxy’s fault;

From HAProxy’s point of view any configuration which exposes either an HTTP or HTTPS endpoint would suffice. (Basically start with the one provided by your distribution’s package.)

However if you don’t provide any other details regarding what issue you are actually encountering no-one on this forum can help you…

(I am using HAProxy with CloudFlare on lots of domains and deployments without any issues, all ranging from simple setups to complex A/B testing ones…)

Please do not use “Configuration samples” category if you are not actually providing a configuration sample. Moving thread to help.