Welcome! Log In Create A New Profile

Advanced

load balance config question

Posted by gdclarke 
load balance config question
December 08, 2010 11:30PM
Hi - I'm hoping that someone can verify the following config will behave as I want. Thanks in advance for the help.


+ setup nginx on lb in front of web01 & web02

+ Objective - have all requests to domain ABC.com served by web01

To achieve this I've setup the following in nginx.conf

upstream webbackend {
server web01
server web02
}

upstream adminbackend {
server web01
}

in conf.d/http.conf

server {
listen 80;
server_name XYZ.com;
location / {
proxy_pass http://webbackend;
}
}

...

server {
listen 80;
server_name ABC.com;
location / {
proxy_pass http://adminbackend;
}
}



Thanks,
Graham
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 304
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