nginx 1.2.7 on CentOS 6.3. Reverse-proxy with two upstream servers.
server should be default, the other should only be used when called from
link on a specific web server.
I have the reverse proxy working fine for the default upstream, but not
quite right on the second, site-specific upstream. Ignoring that I am
rewriting for http to force https (yeah, I know, it’s discouraged to go
encrypted between the nginx proxy and its upstreams, but it’s a
security thing) I am using a two server block configuration, one server
for the default and another for the site-specific server. The
server will link to the default server URL but should rewrite to the
site-specific upstream’s proxy’s URL.
It seems to work - not sure if it gets stuck in the proxy or on the
for the site-specific setup -, but it was suggested that a single
selecting between upstream servers, would be preferable. I would like
know how that would be configured - just a quick overview or link to a
documentation page would help a lot.
If I can throw together a quick test of a single-server-block
config with multiple upstreams which are selected based on calling
could test to see if it’s my multi-server-block setup or a problem on
Posted at Nginx Forum: