Cloudflare blocking Joomla 4 Administration - 520 Error (Nginx Config Problem?)

Hey everyone something i can’t figure out is going on with Cloudflare and Joomla.
It’s been years I’ve been using Cloudflare and Joomla 4 Beta, with SSL.
I decided to upgrade my webserver to nginx from apache, all smooth, SSL reconfigured.
All working nice.
But than i decided to Update Joomla 4 to the latest version wich is no more in beta.
So i reinstalled it with a fresh install, and it is at this point that i discovered that Cloudflare is blocking the Administration panel of Joomla 4 presenting a 520 Unknown Error, going grey or disabling Cloudflare make it work again, so i tried to create a page rule, and i found out it is half working only when i use SSL Flexible, but it has a lot of problems.
Does not seems like I can do anything on my end atm.
Any help?

Edit: it is working fine on Apache, but not on Nginx.

After hour of searching, none worked, and having no response
I experimented with every single Cloudflare option.

Finally i went into “Speed → Optimizations” and i disabled the RailGun.

It is now working as intended.

1 Like

You might want to make sure you have a valid SSL certificate present and installed at your origin host / server.

Before moving to Cloudflare, was your Website working over HTTPS connection?

May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?

Here is a way to re-check if you correctly setup the SSL for your domain with Cloudflare:

True. Flexible SSL has got a lot of issues as described at the below article:

In case you do not have an SSL certificate, you can use Cloudflare SSL, if so, kindly make sure you follow the instructions as follows on the below article to setup an SSL certificate using Cloudflare Origin CA Certificate:

Last but not least, kindly have a look here for more information regarding correct SSL settings at the SSL/TLS tab on Cloudflare dashboard:

Furthermore, do not skip below step and kindly re-check if Cloudflare is allowed to connect to your origin host to as follows in the below article:

Nevertheless, Cloudflare IP addresses list can be found here:

Hi thanks for the response, I already solved the issue by disabling the railgun and I’m back to full strict now, I don’t know why but it was causing weird issues only when using Nginx as a webserver, the 520 error is finally gone.
I’m already using Cloudflare SSL for the certificate and was working as intended.

1 Like