<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6002.16497" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#000000 size=2>Hello All -</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'm having a very strange issue and maybe someone has experienced it or knows the solutions.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'll try to be brief.&nbsp; I have two clusters; we'll call them cluster 1 &amp; 2.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>When I run the configuration everything appears to work.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>But the strange this is that it will only work if I use the URL and not the IP.&nbsp;&nbsp; If i use the IP address it defaults to the other cluster...very strange...here's my config to get a better picture.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; www-data;<BR>worker_processes&nbsp; 2;</FONT></DIV>
<DIV><FONT face=Arial size=2># pid of nginx master process<BR>pid /var/run/nginx.pid;</FONT></DIV>
<DIV><FONT face=Arial size=2># uknown directive<BR>#worker_rlimit_nofile 8192;</FONT></DIV>
<DIV><FONT face=Arial size=2>events {<BR>&nbsp;&nbsp;&nbsp; worker_connections&nbsp; 4096;<BR>&nbsp;&nbsp;&nbsp; # use epoll;<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2>http {<BR>&nbsp;&nbsp;&nbsp; # Allow long server names<BR>&nbsp;&nbsp;&nbsp; server_names_hash_bucket_size 128; <BR>&nbsp;&nbsp;&nbsp; include&nbsp;&nbsp;&nbsp; /etc/nginx/mime.types;<BR>&nbsp;&nbsp;&nbsp; default_type application/octet-stream;<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; log_format&nbsp;&nbsp; main '$remote_addr - $remote_user [$time_local] $status '<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '"$request" $body_bytes_sent "$http_referer" '<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '"$http_user_agent" "$http_x_forwarded_for"';<BR>&nbsp;&nbsp;&nbsp; # main log files<BR>&nbsp;&nbsp;&nbsp; access_log&nbsp;&nbsp; /var/log/nginx/access.log&nbsp; main;<BR>&nbsp;&nbsp;&nbsp; error_log&nbsp; /var/log/nginx_error.log debug;</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; # spool uploads to disk instead of clobbering downstream servers<BR>&nbsp;&nbsp;&nbsp; # client_body_temp_path /var/spool/nginx-client-body 1 2;<BR>&nbsp;&nbsp;&nbsp; # client_max_body_size 32m;<BR>&nbsp;&nbsp;&nbsp; # client_body_buffer_size&nbsp;&nbsp;&nbsp; 128k;<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; server_tokens&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; off;</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; keepalive_timeout&nbsp;&nbsp; 5;</FONT></DIV><FONT face=Arial size=2>
<DIV><BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; # no sendfile on OSX<BR>&nbsp;&nbsp;&nbsp; sendfile&nbsp;&nbsp;&nbsp;&nbsp; on;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; # Optimized default values<BR>&nbsp;&nbsp;&nbsp; tcp_nopush&nbsp;&nbsp; on;<BR>&nbsp;&nbsp;&nbsp; tcp_nodelay&nbsp; off;<BR>&nbsp;&nbsp;&nbsp; </DIV>
<DIV>&nbsp;&nbsp;&nbsp; # compression saves bandwidth<BR>&nbsp;&nbsp;&nbsp; gzip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; on;<BR>&nbsp;&nbsp;&nbsp; gzip_http_version 1.0;<BR>&nbsp;&nbsp;&nbsp; gzip_comp_level&nbsp;&nbsp;&nbsp;&nbsp; 2;<BR>&nbsp;&nbsp;&nbsp; gzip_proxied&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; any;<BR>&nbsp;&nbsp;&nbsp; gzip_min_length&nbsp; 1100;<BR>&nbsp;&nbsp;&nbsp; gzip_buffers&nbsp; 16 8k;<BR>&nbsp;&nbsp;&nbsp; gzip_types&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;<BR>&nbsp;&nbsp;&nbsp; gzip_disable "MSIE [1-6].(?!.*SV1)";<BR>&nbsp;&nbsp;&nbsp; gzip_vary on;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; # proxy settings<BR>&nbsp;&nbsp;&nbsp; proxy_redirect&nbsp;&nbsp;&nbsp;&nbsp; off;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; proxy_set_header&nbsp;&nbsp; Host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $host;<BR>&nbsp;&nbsp;&nbsp; proxy_set_header&nbsp;&nbsp; X-Real-IP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $remote_addr;<BR>&nbsp;&nbsp;&nbsp; proxy_set_header&nbsp;&nbsp; X-Forwarded-For&nbsp; $proxy_add_x_forwarded_for;<BR>&nbsp;&nbsp;&nbsp; proxy_max_temp_file_size 0;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; proxy_connect_timeout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90;<BR>&nbsp;&nbsp;&nbsp; proxy_send_timeout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90;<BR>&nbsp;&nbsp;&nbsp; proxy_read_timeout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; proxy_buffer_size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4k;<BR>&nbsp;&nbsp;&nbsp; proxy_buffers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4 32k;<BR>&nbsp;&nbsp;&nbsp; proxy_busy_buffers_size&nbsp;&nbsp;&nbsp; 64k;<BR>&nbsp;&nbsp;&nbsp; proxy_temp_file_write_size 64k;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; upstream cluster1 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;ip_hash;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;server 10.100.50.72:80;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;server 10.100.50.78:80;<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; include&nbsp;&nbsp;&nbsp; /etc/nginx/cluster1/cluster1.conf;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; upstream cluster2 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;ip_hash;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;server 10.100.50.73:80;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;server 10.100.50.79:80;<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; include&nbsp;&nbsp;&nbsp; /etc/nginx/cluster2/cluster2.conf;</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Here are my two includes:</DIV>
<DIV>&nbsp;</DIV>
<DIV>server {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listen 80;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server_name 10.100.50.13 cluster1.nowhere.net;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; access_log&nbsp; /var/log/nginx/cluster1.access.log main;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; location / {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_pass&nbsp;&nbsp; <A href="http://cluster1">http://cluster1</A>;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header&nbsp;&nbsp;&nbsp; Host&nbsp;&nbsp;&nbsp; $host;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header&nbsp;&nbsp;&nbsp; X-Real-IP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $remote_addr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header&nbsp;&nbsp;&nbsp; X-Forwarded-For $proxy_add_x_forwarded_for;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; error_page&nbsp;&nbsp; 500 502 503 504&nbsp; /50x.html;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; location = /50x.html {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp; /var/www/nginx-default;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;</DIV>
<DIV>server {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listen 80;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server_name 10.100.50.14 cluster2.nowhere.net;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; access_log&nbsp; /var/log/nginx/cluster2.access.log main;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; location / {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_pass&nbsp;&nbsp; <A href="http://cluster2">http://cluster2</A>;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header&nbsp;&nbsp;&nbsp; Host&nbsp;&nbsp;&nbsp; $host;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header&nbsp;&nbsp;&nbsp; X-Real-IP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $remote_addr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header&nbsp;&nbsp;&nbsp; X-Forwarded-For $proxy_add_x_forwarded_for;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; error_page&nbsp;&nbsp; 500 502 503 504&nbsp; /50x.html;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; location = /50x.html {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp; /var/www/nginx-default;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;</DIV>
<DIV>So in the 'include' files you'll notice i have the URL's.&nbsp; If keep the URL's in the configuration everythign works fine.</DIV>
<DIV>However if I just want to use the IP it defaults to the first conf&nbsp; file</DIV>
<DIV>&nbsp;</DIV>
<DIV>Example:&nbsp; server_name 10.100.50.14;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Will always mysteriously just default to 10.100.50.13... </DIV>
<DIV>&nbsp;</DIV>
<DIV>Any help would be appreciated.</DIV>
<DIV>&nbsp;</DIV>
<DIV>-Shamunda</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT>&nbsp;</DIV><!--[object_id=#playlan.com#]--><P align=left><FONT face=Tahoma size=2><FONT color=#0000ff>***** Email confidentiality notice *****</P>
<P align=left><FONT face=Tahoma size=2><FONT color=#0000ff>26/1/2009</FONT></FONT></P>
<P align=left><FONT face=Tahoma size=2><FONT color=#0000ff>This message is private and confidential.&nbsp; If you have recieved this message in error, please notify us and remove it from your system.</FONT></FONT></P></FONT></FONT></BODY></HTML>