502 error after activate cloudflare

Hello everyone .
When i activate cloudflare on my website sometimes it shows 502 bad gateway error ,toomany redirect erro or site is loading for many minutes
Im using server that uses nginx as a reverse proxy
Now im pause cloudflare for my account but i really want enable it
Thank you
sitelanka.com

May I ask have you tried checking with the steps from below article?

https://support.cloudflare.com/hc/en-us/articles/115003011431-Troubleshooting-Cloudflare-5XX-errors#502504error

Therefore, have you checked your access or error log at your origin host/server for any clue?

Is your Nginx working over HTTP or HTTPS?

Nevertheless, over what port does it work?
Maybe you need to re-check over which port is your application / web server working, as it has to be compatible and supported by Cloudflare as follows in the below article:
https://support.cloudflare.com/hc/en-us/articles/200169156-Identifying-network-ports-compatible-with-Cloudflare-s-proxy

If it’s working over HTTPS, do you have a valid SSL certificate installed which covers both your main non-www domain and www domain?

Furthermore, what SSL option have you got at SSL/TLS tab at Cloudflare dashboard for your domain? (Flexible, Full, Strict SSL …)

May I also ask, is Cloudflare allowed to connect to your host origin?
Kindly, re-check from below article:
https://support.cloudflare.com/hc/en-us/articles/201897700-Allowing-Cloudflare-IP-addresses

Cloudflare IP address ranges can be found here:

What happens when it’s enabled and the DNS records are :orange: cloud (Proxied via Cloudflare)?

QUESTION
sitelanka.com. IN A
ANSWER
sitelanka.com. 299 IN A 75.119.143.92

I don’t get a 502 error but you should contact your hosting provider to troubleshoot these common causes at your origin web server:
Basically, follow the steps below

  1. Ensure the origin server responds to requests for the hostname and domain within the visitor’s URL that generated the 502 or 504 error.
  2. Investigate excessive server loads, crashes, or network failures.
  3. Identify applications or services that timed out or were blocked.

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