Re: Nginx-Upstream-proxy next upstream-惊天大

Y
  • 1 Jun '12
Accordance with the above configuration, When the domain
"flvstorage.ppserver.org.cn," nginx nslookup results is just a one IP
address, this backend upstream can't be used.

my apology for my bad english.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,227075,227089#msg-227089
B
  • 1 Jun '12
Do something like this:

you need to define a resolver:

resolver 8.8.8.8; # or your dns serevrs

location / {
    set $myupstream flvdownload.ppserver.org.cn;
    proxy_pass http://$myupstream;
}

if you need it to use multiple ip addresses.
Y
  • 4 Jun '12
thanks Brian

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