Hi, I am new to Nginx and require some beginner advice.
I have multiple webservers, running various apps (seafile, zammand, urbackup) all as VMs on the same network. All need to be accessed via https protocol.
After hours of reading, I'm still a bit lost on how to move forward. Looking at load-balancing, it doesn't seem to do what I'm after as it passes traffic to a random server in case one is down) BUT I see the backup/upstream is possibly what I'm after.
Actual scenario:
Servers:
172.16.1.21 - NGINX Server - All incoming WAN HTTP/HTTPS traffic goes to this Server
172.16.1.12 - WebServer1 - support.y-tec.co.uk
172.16.1.20 - WebServer2 - cloud.y-tec.co.uk
I want to pass all incoming HTTP/HTTPS traffic to "172.16.1.21 - NGINX Server" which will then pass to the correct server depending on which incoming url was passed;
So traffic to support.y-tec.co.uk will be routed to "172.16.1.12 - WebServer1" (https)
and
traffic to cloud.y-tec.co.uk will be routed to "172.16.1.20 - WebServer2" (https)
Is it possible to just edit say the config (or maybe active-sites) on "172.16.1.21 - NGINX Server" with "headers" (e.g. support.y-tec.co.uk) which then passes to the backend server?
Thanks.
I have multiple webservers, running various apps (seafile, zammand, urbackup) all as VMs on the same network. All need to be accessed via https protocol.
After hours of reading, I'm still a bit lost on how to move forward. Looking at load-balancing, it doesn't seem to do what I'm after as it passes traffic to a random server in case one is down) BUT I see the backup/upstream is possibly what I'm after.
Actual scenario:
Servers:
172.16.1.21 - NGINX Server - All incoming WAN HTTP/HTTPS traffic goes to this Server
172.16.1.12 - WebServer1 - support.y-tec.co.uk
172.16.1.20 - WebServer2 - cloud.y-tec.co.uk
I want to pass all incoming HTTP/HTTPS traffic to "172.16.1.21 - NGINX Server" which will then pass to the correct server depending on which incoming url was passed;
So traffic to support.y-tec.co.uk will be routed to "172.16.1.12 - WebServer1" (https)
and
traffic to cloud.y-tec.co.uk will be routed to "172.16.1.20 - WebServer2" (https)
Is it possible to just edit say the config (or maybe active-sites) on "172.16.1.21 - NGINX Server" with "headers" (e.g. support.y-tec.co.uk) which then passes to the backend server?
Thanks.