Welcome! Log In Create A New Profile

Advanced

Need to proxypass to different servers.

All files from this thread

File NameFile Size Posted byDate 
smime.p7s6 KBopen | downloadGreenGecko03/21/2013Read message
Geo P.C.
March 18, 2013 11:56PM
We have 3 servers with Nginx as webserver. The setup is as follows:



Server1 : Proxy server

Server2 : App Server1

Server3 : App Server 2



In both App servers port 80 is accessed only by Proxy server.



We need to setup in such a way that while accessing geotest.com it will go
to proxy server and then it should proxypass to app server1 and while
accessing geotest.com/cms it should go to proxy server and then to app
server 2.



So in proxy server we need to setup as while accessing geotest.com and all
its subdirectories like geotest.com/* it should go to app server 1 except
while accessing geotest.com/cms and its subdirectories it should go to app
server2.



Please let us know how we can configure it.



In proxy server we setup as follows but is not working:



server {

listen 80;

server_name geotest.com;

location / {

proxy_pass http://app1.com;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

}

location /ui {

proxy_pass http://app2.com;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

}

}



Can anyone please hlp us on it.



Thanks

Geo
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
SubjectAuthorPosted

Need to proxypass to different servers.

Geo P.C.March 18, 2013 11:56PM

Re: Need to proxypass to different servers.

Francis DalyMarch 19, 2013 05:22AM

Re: Need to proxypass to different servers.

Geo P.C.March 19, 2013 10:14AM

Re: Need to proxypass to different servers.

senior.weber@gmail.comMarch 19, 2013 10:42AM

Re: Need to proxypass to different servers.

Igor SysoevMarch 20, 2013 04:44AM

Re: Need to proxypass to different servers.

geopcgeoMarch 21, 2013 01:46AM

Re: Need to proxypass to different servers.

Francis DalyMarch 19, 2013 04:18PM

Re: Need to proxypass to different servers.

geopcgeoMarch 21, 2013 01:48AM

Re: Need to proxypass to different servers. Attachments

GreenGeckoMarch 21, 2013 01:56AM

Re: Need to proxypass to different servers.

geopcgeoMarch 21, 2013 02:10AM

Re: Need to proxypass to different servers.

Francis DalyMarch 21, 2013 02:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 5 on December 17, 2014
Record Number of Guests: 154 on December 17, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready