On Fri, Apr 10, 2015 at 06:29:38PM -0400, cloud devops wrote:
Hi there,
> Yes "market.cloud.com" and "panel.cloud.com" resolve to the nginx server.
> 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:
==
server {
server_name market.cloud.com;
location / {
proxy_pass http://market.cloud.com;
}
}
server {
server_name panel.cloud.com;
location / {
proxy_pass http://panel.cloud.com;
}
}
==
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.
f
--
Francis Daly [email protected]
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx