My application in production is behind a reverse proxy, nginx, and https is handled by nginx too. Meaning, a Phoenix applications runs as http and on a non-standard port.
For the emails, for instance, I need the full urls. At the moment calling Routes.something_url(...) will result in the urls such as http://blahblahblahblah.com:8080/abc
This is from my production code, so yes, I’d say that I have tried it.
The host_port value is the port visible to the outside world (the one that your reverse proxy serves). I set it to 443 when I run the app (in my Systemd file where I control the environment). The port value should be the internal port that Phoenix binds to. You can see that you need to tell Phoenix both of these values.