Welcome! Log In Create A New Profile

Advanced

Re: Need to proxypass to different servers.

All files from this thread

File Name File Size   Posted by Date  
smime.p7s 6 KB open | download GreenGecko 03/21/2013 Read message
Francis Daly
March 19, 2013 05:22AM
On Tue, Mar 19, 2013 at 09:25:09AM +0530, Geo P.C. wrote:

Hi there,

> We have 3 servers with Nginx as webserver. The setup is as follows:

> 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.

"location /cms" should have "proxy_pass" to app2, "location /" should have
"proxy_pass" to app1. Almost exactly as you show. Except that you spell
"cms" "ui", for some reason.

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

Be specific.

What one request do you make that does not give the response that you
expect? What response do you get instead?

Other things: you must set the world up so that the browser actually
gets to your proxy server when requesting geotest.com. That's outside
of anything nginx can do.

You must set things up so that nginx actually gets to your app2 server
when...

> proxy_pass http://app2.com;

....using the name app2.com. That needs a working resolver, or a configured
upstream block. Or just use the IP address directly here.

And you will *probably* want to make sure that everything on app2 knows
that it is effectively being served below /cms, as otherwise any links
to other resources on that server may not work as you want.

(And note that "location /cms" and "location /cms/" do different things,
and may not both be what you want.)

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Need to proxypass to different servers.

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

Re: Need to proxypass to different servers.

Francis Daly March 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.com March 19, 2013 10:42AM

Re: Need to proxypass to different servers.

Igor Sysoev March 20, 2013 04:44AM

Re: Need to proxypass to different servers.

geopcgeo March 21, 2013 01:46AM

Re: Need to proxypass to different servers.

Francis Daly March 19, 2013 04:18PM

Re: Need to proxypass to different servers.

geopcgeo March 21, 2013 01:48AM

Re: Need to proxypass to different servers. Attachments

GreenGecko March 21, 2013 01:56AM

Re: Need to proxypass to different servers.

geopcgeo March 21, 2013 02:10AM

Re: Need to proxypass to different servers.

Francis Daly March 21, 2013 02:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 256
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready