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:
- 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:
- Firewall Configuration: Could you please check if any firewall rules are blocking Cloudflare’s IP addresses?
- Server Logs: Could you review the server logs to identify any issues related to the 520 error when requests come from Cloudflare?
- Docker Configuration: Ensure that the Docker setup correctly routes requests from Cloudflare to the appropriate application.
- 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.