Hosting a Phoenix app from within a domain's subdirectory with Nginx
Hosting a static HTML site with Nginx is pretty trivial. Hosting a Phoenix app with Nginx is somewhat straightforward. But hosting a Phoenix app from within a static HTML site’s subdirectory takes a little more setup.
In this post, I go over the configurations you need to make on the Nginx side as well as the Phoenix side to ensure your Phoenix app can run from within a domain’s subdirectory (i.e. htmlsite.com/phoenixapp). Hopefully it’ll help you avoid the pitfalls I experienced.
http://geoffreylessel.com/2016/hosting-a-phoenix-app-in-a-subdirectory-with-nginx/
Read next Scoped Finds with Ecto in Phoenix