cogini / elixir-deploy-template

An example project for deploying Elixir
MIT License
83 stars 14 forks source link

Use nginx for the webserver? #9

Closed mikehostetler closed 6 years ago

mikehostetler commented 6 years ago

Why not use nginx for the webserver vs. using iptables to route port 80 to 4000?

Was this intentional, or just trying to keep things simpler?

reachfh commented 6 years ago

It's intentional. Unless you need Nginx, e.g. to be a common front end which routes traffic to multiple back end applications, it's better to just have Phoenix listen directly.

Here is a full Nginx config and discussion of where it starts to fall down under load: https://www.cogini.com/blog/serving-your-phoenix-app-with-nginx/

mikehostetler commented 6 years ago

Interesting, thanks!