Condition in upstream

thigomes nginx-forum at nginx.us
Wed Sep 12 20:31:48 UTC 2012


Hi guys,

I'm studying about in the use of upstream in the nginx. And I have a
question about the condition of use it.

Now, I have the following environment in production:
Internet -- > Nginx --> Varnish --> Apache

I would like of set in upstream a backup's server, for example:
upstream backend  {
ip_hash;
       server 192.168.1.5:6081; # varnish server
       server 192.168.1.7:80 backup; # apache server
}

But in the case the configuration of the "location /" will change according
with the server.

Is there some parameter of condition that I can used?

Best regards,
Thiago Gomes

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,230678,230678#msg-230678



More information about the nginx mailing list