Hello,
I am on my way deploying a phoenix app in a remote droplet by DO. Using a nginx server. So, I have created my server, all working, but on port :4000 (obviously). I am trying to forwards this port to my domain example.com, but something isnt right for sure. Viewed this post Need help with Nginx configuration, to serve phoenix app, but frankly idk what more to do.
I don’t know how to help you with your Nginx configuration but I can suggest you a more easy and automated setup, that I use for my Video Notes web app running on DO with Traefik and Docker.
I have automated the creation of the server with Traefik, Docker and LetsEncrypt via a cloud-init file that you upload when creating the dropplet:
The cloud-init file will also do a lot of security hardening during the creation of the server.
@ykostov please check this. Also you can run sudo nginx -t to check if your configuration is valid.
You can create the symbolic link with below command after moving to /nginx/sites-enabled directory sudo ln -s ../sites-available/xyz.conf xyz.conf.
And check if the nginx service itself is running.