Problems with bad gateway from cloudflare to NGINX

I am running truenas core, and trying to get NGINX proxy setup so that cloudflare requested comming in on my cloudflare domain are redirected to an internal IP and port. I had this working fine for another app, but now i am adding photoprism, and i get a host error from cloud flare. I have HTTP and HTTPS forwarded to the proper ports for NGINX. not sure what i am missing. Let me know what data i should share to help.
-Cloudflare domain has A record pointing to my public IP
-NGINX has proxy host entry to point that domain to internal IP and port