502 error after activate cloudflare

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