I have a “demo server” where I can run versions of stuff we are working on to show off to clients. I already have a Go app and a Laravel app running, so I really need nginx there.
I configured a vhost for a small phoenix project we are currently working on. I wanted to test my set up, so I fired up up phoenix app as I normally locally, in development mode. I made one singe change, in config/config.exs, changing the URL from localhost to the DNS name of my server.
url: [host: "some.server.com"],
At this point I was only interested in seeing if my nginx configuration was working, so I fired up with mix phx.server as usual (after doing all the other setup of course). Everything seemed to work fine, except one little detail: the URLs in the registration and login emails contain the port number.
Since this is a demo server, I could of course just bypass nginx and just let the URL contain the port number. But suppose I still want to go ahead the way I have done so far (that way I can let the nginx layer worry about TLS instead of trying to figure that out at phoenix level). Is there a simple way to customize the URL to NOT include the port number in outgoing emails?
Am I right to assume this would be an issue with a production build as well? Assuming, I choose to stay behind a proxy, that is.






















