Best config for nginx reverse proxy on running phoenix app

In that case tutorials are doing you a disservice, because you can have Phoenix directly facing the Internet traffic, and LetsEncrypt is easy to tackle with @sasajuric library:

You can also read this article:

https://progressplum.app/blog/ssl-migration-from-nginx-to-cowboy-2-in-phoenix-1-4/

The docs for https:

https://hexdocs.pm/phoenix/using_ssl.html

And this example from myself in another post:

Please bear in mind that I posted it in 2018, therefore the ciphers must be updated to match current security standards.

Also bear in mind that when configuring https you need to pass all the configuration, not just the keys you are interested in configuring, because at the core the configuration is not merged, only replaced, thus you can end-up without https or with a less secure configuration.

4 Likes