<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<br><br><font class="Apple-style-span" face="Tahoma" size="2">Hello</font><div style="font-family: Tahoma; font-size: 10pt; "><br>We have setup nginx as a Loadbalancer on Centos 5.2 x64. nginx is acting as a LB for a web application developed using Java servlets and Icefaces (1.8.2). The web application is deployed on JBoss 5.1. After configuration nginx is able to redirect the queries to the upstream servers properly. However the session information is not being passed through or is being modified. So the Icefaces servlet is repeatedly refreshing the login page every few seconds and keeps creating new sessions.</div><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div style="font-family: Tahoma; font-size: 10pt; ">Please advise on any additional settings that need to be made. The current settings are:</div><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div style="font-family: Tahoma; font-size: 10pt; ">(nginx is running on 192.168.1.137)</div><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div><div><font class="Apple-style-span" face="Tahoma" size="2">upstream int-lb {</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> server 192.168.1.139:8080;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> server 192.168.1.138:8080;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2">}</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">server {</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> listen 80;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> server_name int-lb;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> #charset koi8-r;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> access_log /var/log/nginx/host.access.log main;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> error_log /var/log/nginx/host.error.log debug;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> root /usr/app/jboss5/server/default/deploy/admin-console.war;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> location / {</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> proxy_set_header X-Forwarded-Host $host;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> proxy_set_header X-Forwarded-Server $host;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> proxy_pass http://int-lb;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> }</font></div><div><font class="Apple-style-span" face="Tahoma" size="2">}</font></div></div><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div style="font-family: Tahoma; font-size: 10pt; ">Thanks in advance for all assistance.<br><br>Regards<br>Srini</div> </div></body>
</html>