Wordpress+nginx-proxy docker + letsencrypt = 5xx Errors only when Cloudflare proxy is enabled. Working otherwise


I have a (supposedly) fully working Wordpress website with Docker using nginx-proxy and letsencrypt through GitHub - evertramos/nginx-proxy-automation: Automated docker nginx proxy integrated with letsencrypt.. The LE certificate is correctly issued and works. The domain is on Cloudflare. I am using Full (strict) SSL.

Here is my issue:

  • If under DNS, I disable Cloudflare HTTP Proxy (CDN) [grey cloud], everything works fine. Site is accessible, I see LE valid SSL, all is quick and snappy.
  • If under DNS, I enable Cloudflare HTTP Proxy (CDN) [orange cloud], my website starts alternating between Error 504 Gateway Time-Out, Error 520 unknown, generic Error 500, and (very slowly and infrequently) displaying a web page from my website.

Anybody could help? Thanks!

I fixed the issue. something (still can’t figure what) of my server settings and/or Cloudflare was making dozens of requests per second to a file (my website logo, actually). The request was for a file that was not existing (404). My server was basically DOSing itself. I still do not know what caused it and why it happened, but putting the logo under the requested URL stopped the issue completely. As always: check logs carefully!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.