test ok with nginx 1.8.0,which nginx version you use? nginx must be confused by same domain name and upstream name, rename the upstream name! Posted at Nginx Forum: https://forum.nginx.org/read.php?2,268548,268550#msg-268550