Seeking Assistance with Fly.io machines

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 in fly.io)
  • Cloudflare Configuration: CNAME record pointing to hs.fly.dev, proxied through Cloudflare
  • Error Code: 520 when accessing the proxy url from my domain on 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: path.mydomain.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 fly.io server setup.
  • I don’t have direct access to server logs or firewall settings on the fly.io 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 from cloudflare proxy.

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

try these steps: Some requests are not reaching fly.io servers - #8 by khuezy

Hi @mancode ,
Can you confirm if the subdomain name provided by the Fly.io app/machine is “hs.fly.dev”?

Because you set a CNAME record pointing to this subdomain,
I tested it, and it is not valid (returning a privacy error).

Thanks
Madhurya Dutta

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