Seeking Assistance with 520 Error When Using Cloudflare Proxy

Hi everyone,

I hope you’re all doing well. I’m currently facing a challenge with my setup and would appreciate any help or insights you can provide.

Issue Details:

I’m trying to use Cloudflare as a proxy for my site, but I’m encountering a “520 Web Server is Returning an Unknown Error” message. Here are the specifics:

  • Origin Server IP: 66.241.124.246 (shared between multiple applications)
  • Cloudflare Configuration: CNAME record pointing to hs.fly.dev, proxied through Cloudflare
  • Error Code: 520 when accessing via Cloudflare

What I’ve Tried So Far:

  1. Direct Access: Accessing the site directly using the IP address and correct Host header works fine:
curl -v -H "Host: our.yourdomain.com" http://66.241.124.246

This returns the expected content without issues.
2. Firewall and Security: Ensured that Cloudflare IP ranges are not blocked by any firewall or security settings.
3. SSL/TLS Settings: Verified that SSL/TLS settings in Cloudflare match those on the origin server.

My Constraints:

  • I am not in control of the origin server setup. It is managed by our hosting provider and involves a Docker configuration.
  • I don’t have direct access to server logs or firewall settings on the origin server.

Request for Assistance:

Given these details, I’m seeking assistance with the following:

  1. Firewall Configuration: Could you please check if any firewall rules are blocking Cloudflare’s IP addresses?
  2. Server Logs: Could you review the server logs to identify any issues related to the 520 error when requests come from Cloudflare?
  3. Docker Configuration: Ensure that the Docker setup correctly routes requests from Cloudflare to the appropriate application.
  4. Virtual Host Configuration: Verify that the virtual host configuration on the server is correctly handling requests for our.yourdomain.com.

Any guidance or support in resolving this issue would be greatly appreciated. Thank you in advance for your time and assistance.

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