DEV Community

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

Collapse
 
davbaster profile image
davbaster • Edited

Hi,
I have completed this tutorial, and it helped me a lot, however I needed to do a couple of changes in order to work on my side.

First, I changed the name of the networks, since on my side they were called webservice1_default instead of site1_default. I found the name of the network by executing this docker command: "docker network ls"

dev-to-uploads.s3.amazonaws.com/i/...

Second, I had to found out which were my containers' ip, since the ones listed here are different than mine. I found the ips by inspecting the networks I found before. I used "docker network inspect NameOfYourNetwork" command.

dev-to-uploads.s3.amazonaws.com/i/...

Third, I had to modify my hosts file with the correct ips I found in the previous step.

dev-to-uploads.s3.amazonaws.com/i/...

Finally, I needed to do some modifications in docker-compose.yml file for the proxy, since the identitation was no correct. In the below image you can see the correct identation.

dev-to-uploads.s3.amazonaws.com/i/...

Thanks to the author for taking the time to do this tutorial.