W
W
WGOS2017-03-26 17:19:52
Nginx
WGOS, 2017-03-26 17:19:52

How to set up nginx proxy for two sites?

The point is this.
There is a host machine with IP 1.2.3.4
There are two containers in the machine, each with a site.
Container IP 1: 192.168.10.11
Container IP 2: 192.168.10.12
Domains site1.ru and site2.ru have an A record on the IP of the machine.
How can I use nginx to make sure that when site1.ru is opened, there is a site from container 1 and when site2.ru is opened from container 2, respectively?
Some scheme:
site1.ru > 1.2.3.4 > 192.168.10.11
site2.ru > 1.2.3.4 > 192.168.10.12

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question