# Haproxy behind CloudFlare

**URL:** <https://discourse.haproxy.org/t/haproxy-behind-cloudflare/4470>\
**Category:** Help!\
**Created:** [November 5, 2019, 6:31pm UTC](https://discourse.haproxy.org/t/haproxy-behind-cloudflare/4470 "2019-11-05T18:31:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yogibjorn](https://avatars.discourse-cdn.com/v4/letter/y/73ab20/32.png) [@yogibjorn](https://discourse.haproxy.org/u/yogibjorn)\
**Post date:** [November 5, 2019, 6:31pm UTC](https://discourse.haproxy.org/t/haproxy-behind-cloudflare/4470/1 "2019-11-05T18:31:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ciprian.craciun](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/ciprian.craciun/32/722_2.png) [@ciprian.craciun](https://discourse.haproxy.org/u/ciprian.craciun)\
**Post date:** [November 5, 2019, 8:03pm UTC](https://discourse.haproxy.org/t/haproxy-behind-cloudflare/4470/2 "2019-11-05T20:03:06Z")

</div>

What are you exactly looking for?

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

---

<div class="post-metadata">

**Author:** ![yogibjorn](https://avatars.discourse-cdn.com/v4/letter/y/73ab20/32.png) [@yogibjorn](https://discourse.haproxy.org/u/yogibjorn)\
**Post date:** [November 5, 2019, 8:37pm UTC](https://discourse.haproxy.org/t/haproxy-behind-cloudflare/4470/3 "2019-11-05T20:37:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ciprian.craciun](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/ciprian.craciun/32/722_2.png) [@ciprian.craciun](https://discourse.haproxy.org/u/ciprian.craciun)\
**Post date:** [November 5, 2019, 9:05pm UTC](https://discourse.haproxy.org/t/haproxy-behind-cloudflare/4470/4 "2019-11-05T21:05:30Z")

</div>

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…)

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [November 6, 2019, 10:12am UTC](https://discourse.haproxy.org/t/haproxy-behind-cloudflare/4470/5 "2019-11-06T10:12:02Z")

</div>

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