Welcome! Log In Create A New Profile

Advanced

Proxy Server or Load Balancer to pass specific URLS

Posted by Yosh 
Proxy Server or Load Balancer to pass specific URLS
March 03, 2018 12:51PM
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.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 163
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready