Error 521 in Laravel Forge

I am configuring Laravel Forge with cloudflare but it is impossible, I constantly have 521 errors

Hi there,

Thank you for reaching out to us. Sorry to hear you are experiencing some difficulties here.

A 521 error happens when we are unable to make a TCP connection to your origin server, typically because the connection was refused which often can be caused by security or firewall software.

Because Cloudflare operates as a reverse proxy the IP address your server will see is one of a limited number of Cloudflare IPs. In that sense, many actual visitors may all come from the same IP address, which can cause firewalls or security software that is not appropriately allowing the Cloudflare IP ranges to block this traffic as it may see it as excessive or malicious. We publish a full list of our IP ranges so that you can allowlist them accordingly.

I would make sure that your hosting provider confirms that the Cloudflare IP ranges listed in the URL above are fully allowed from any security software, firewall etc., to ensure there is no rate limiting or blocking of our edge server requests to your infrastructure. This should ensure that Cloudflare can consistently make a connection to your origin server to retrieve content and serve it to your visitors.


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