Here is my situation: I will have one frontend server running nginx, and
multiple backends servers running apache or tomcat with different
applications. I am NOT trying to do any load balancing. What I need to
do is
setup nginx to proxy connections to specific servers based on a specific
IP
of nginx.
I’m using the nginx 1.6.1.
I tried the configuration below but I have trouble with the location
configuration, I need a dynamic configuration that does not impact the
backend servers.
On Fri, Apr 10, 2015 at 12:45:21PM -0400, cloud devops wrote:
Hi there,
Here is my situation: I will have one frontend server running nginx, and
multiple backends servers running apache or tomcat with different
applications. I am NOT trying to do any load balancing. What I need to do is
setup nginx to proxy connections to specific servers based on a specific IP
of nginx.
What request do you make that does not give the response that you want?
When I make http://panel.cloud.com I have the first site which is on the
first stream
Si I make http://panel.cloud.com/panel, in this case it was redirected
to
the home page of the second site as the configuration is done but i can
not
navigate on the site because the URL is changed.
On Fri, Apr 10, 2015 at 05:09:33PM -0400, cloud devops wrote:
Hi there,
When I make http://panel.cloud.com I have the first site which is on the
first stream
Si I make http://panel.cloud.com/panel, in this case it was redirected to
the home page of the second site as the configuration is done but i can not
navigate on the site because the URL is changed.
My issue is to point the nginx server to many backend server, the nginx
requires to have different location which cause probleme to navigate in the
different backen server. Is there a solution to work with nginx as a reverse
proxy for many backend servers (differents sites)
nginx needs some way of knowing which backend server to use, for each
individual request.
The simplest is probably just to use the host in the request:
If that is not appropriate, then the next most straightforward is
probably
to change the backend servers so that all of the content on 10.1.0.12 is
available below “/panel/”, and all of the content on 10.1.0.16 is below
“/market/” (or some other unique prefix) and use that as the way that
nginx can decide which backend to use.
When I do “curl -i http://panel.cloud.com/”, Iget the response from
10.1.0.16 and it work fine because it’s on the location /
When I do “curl -i http://panel.cloud.com/panel”, I get the response
from
10.1.0.12 but with /panel on the URL. So After i get the home page I
can’t
go the the other page because the URL contain the “/panel”
My issue is to point the nginx server to many backend server, the nginx
requires to have different location which cause probleme to navigate in
the
different backen server. Is there a solution to work with nginx as a
reverse
proxy for many backend servers (differents sites)
Thank you in advance
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.