DEV Community

Discussion on: How to set up NGINX Docker Reverse Proxy?

Collapse
 
nicolasgoudard profile image
Nicolas G • Edited

Hello
This tutorial does not work, but I success with another
1- A part is missing ; The site1_default and site2_default networks should be created before,

2- The container names site1_app_1 and site2_app_1 are not defined, because autogenerated by docker : in my Docker version it generates webservice1_app_1 and webservice1_app_2. The best practice is to give a name to containers in the docker-compose.yml file, using the "container_name" keyword .
3- Cannot resolve the container names inside the Nginx container : so the proxy_pass directive dos not work, I think I must configure something in my Docker configuration, but it is not explained in this tutorial
4- Let's encrypt does not work generate the certificates because the server does not exist in the DNS ( pointer A missing)
5- site1.test and site2.test are bad declared in the /etc/hosts file . Normally you should declare in one line, like that : "172.31.30.78 site1.test site2.test"
Best regards