upstream host name or address

torajx nginx-forum at
Mon Jun 20 08:57:09 MSD 2011

hi again and thank you fo reply
this is my main config file; sorry i remove real ip address and site

  upstream mysites {
       server weight=5;
#       server weight=3;
  upstream mysites_hash {
       ip_hash; #base on clinet ip address and can not use weight;
#       server;
  upstream myimages {
  server {
       listen    80;
       set $tmp tempstr;
       access_log var/log/nx_csupdate_access.log main;
       log_format  main  "$upstream_addr";

       location /  {
             deny all;
       location /csupdate/images {
             proxy_pass      http://myimages;
       location /csupdate {
          proxy_pass      http://mysites_hash;
          proxy_set_header Host;

as you can see i commented my 2th server in my upstream; 
the proxy_set_header line in location /csupdate was the only soloution
that solved
my problem; because my servers (, 2) will redirect users base
on some condition
and without proxy_set_header line the browsers fall in endless loop and
retun errors;

for $upstream_addr in can see in my log files as i
formated simply likme above;
but what is soloution in i want to use server too ??

thank you in advance

Posted at Nginx Forum:,208188,208379#msg-208379

More information about the nginx mailing list