I am having the following configuration:
I have 5 LXC containers that are running nginx. On each container there are a couple of virtual hosts set up in nginx. That means for a container I have multiple virtual hosts that are available through port 80.
Each container has an IP like 10.0.3.100, 10.0.3.101, etc.
On the host machine, I also have a nginx server running that has virtual hosts defined.
I would like to know how can I achieve the following: The nginx virtual hosts on the host machine to map on each virtual host on the containers.
For example: HOST: d1.example.com -> CONTAINER1: d1.example.com HOST: d2.example.com -> CONTAINER1: d2.example.com HOST: d3.example.com -> CONTAINER2: d3.example.com
All of them should be available on port 80.
Is there any way to achieve this setup?