What I mean is resolve it on the nginx box itself, I've seen it many times that people override entries with /etc/hosts tricks. Your nginx is supposed to look there first. But thats quite an interesting point you make there. I'm still not convinced it's not a resolving issue now.
How about trying it as such:
under http:
upstream ie_daemon {
server site1.example.com:80;
# [... up to the number of instance, or more, if you want to be free to add more ...]
}
Then under server (keep your server_name)
location / {
proxy_pass http://ie_daemon;
# include /etc/nginx/proxy.conf;
# my system doesn't have the proxy.conf file so I needed to add the following two lines to get redirects working:
proxy_redirect default;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Remember, check resolving from inside and outside the server network to be sure it all matches up. I learned to always check the basics over and over again, saves me so much time.
Good luck