Query re: upstreams and two protocols

Steve Howe daryn at steelsword.org.uk
Tue Jun 28 16:01:28 UTC 2016


Hi all,

First time posting here so apologies for any faux pas etc...

I have an nginx config where I have a server block, a location block and a
proxypass in the location block, pointing to an upstream.

The upstream has, at this point 3 servers in it.

All the 3 servers are in the same vpn. The proxy_pass directive pointing
traffic to that upstream uses the http protocol

I want to add another server into the upstream endpoints, located in a
remote datacentre. I want traffic to this remote datacentre to be encrypted
over https.

The proxy_pass can't handle http and https simultaneously

Any ideas how I can have an upstream containing the 3 servers in the local
datacentre that shouldn't use https, and the 1 server in the remote
datacentre that does need the traffic to be encrypted with https, please?


Someone suggested putting a server definition in the upstream that directs
to a local nginx server definition that's designed to just forward off to
another upstream with an https proxy_pass command, with the second upstream
holding the remote datacentre server definition but it seems a bit kludgy.


Thanks for any advice!

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160628/c08e7d01/attachment.html>


More information about the nginx mailing list