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.