It’s impossible to tell, as there are a bunch of ways you could have your reverse proxy broken. And a bunch of ways that moving discourse somewhere other than /var/discourse could make it easy to make a mistake. If you search here, you’ll find dozens of posts about problems caused by cloudflare’s proxying.
You’d be better off starting with something that worked and making one change at a time.