<p class="MsoNormal">We have 3 servers with Nginx as webserver. The setup is as
follows:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Server1 : Proxy server</p>
<p class="MsoNormal">Server2 : App Server1</p>
<p class="MsoNormal">Server3 : App Server 2</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">In both App servers port 80 is accessed only by Proxy
server.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">We need to setup in such a way that while accessing <a href="http://geotest.com">geotest.com</a>
it will go to proxy server and then it should proxypass to app server1 and
while accessing <span style> </span><a href="http://geotest.com/cms">geotest.com/cms</a> it
should go to proxy server and then to app server 2.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">So in proxy server we need to setup as while accessing <a href="http://geotest.com">geotest.com</a>
and all its subdirectories like <a href="http://geotest.com/*">geotest.com/*</a> it should go to app server 1
except while accessing <a href="http://geotest.com/cms">geotest.com/cms</a> and its subdirectories it should go to
app server2.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Please let us know how we can configure it.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">In proxy server we setup as follows but is not working:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">server {</p>
<p class="MsoNormal"><span style> </span><span style> </span>listen 80;</p>
<p class="MsoNormal" style="text-indent:36.0pt">server_name <a href="http://geotest.com">geotest.com</a>;</p>
<p class="MsoNormal"><span style> </span><span style> </span>location / {</p>
<p class="MsoNormal"><span style> </span><span style> </span>proxy_pass<span style> </span><a href="http://app1.com">http://app1.com</a>;</p>
<p class="MsoNormal"><span style> </span><span style> </span>proxy_set_header
Host<span style> </span>$host;</p>
<p class="MsoNormal"><span style> </span><span style> </span>proxy_set_header
X-Real-IP $remote_addr;</p>
<p class="MsoNormal"><span style> </span><span style> </span>}</p>
<p class="MsoNormal" style="text-indent:36.0pt">location /ui {</p>
<p class="MsoNormal"><span style> </span><span style> </span>proxy_pass <a href="http://app2.com">http://app2.com</a>;</p>
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt">proxy_set_header
Host<span style> </span>$host;</p>
<p class="MsoNormal"><span style> </span><span style> </span>proxy_set_header
X-Real-IP $remote_addr;</p>
<p class="MsoNormal"><span style> </span>}</p>
<p class="MsoNormal"><span style> </span>}</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Can anyone please hlp us on it.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks</p>
<p class="MsoNormal">Geo</p>