BAS Gateway Error 502

Yes, Without Cloudflare the website is working fine,
But when enabled cloudflare , it gives random bad gateway error