# Query re: upstreams and two protocols

**URL:** <https://www.ruby-forum.com/t/query-re-upstreams-and-two-protocols/244861>\
**Category:** NGINX\
**Created:** [June 28, 2016, 6:02pm UTC](https://www.ruby-forum.com/t/query-re-upstreams-and-two-protocols/244861 "2016-06-28T18:02:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [June 28, 2016, 6:02pm UTC](https://www.ruby-forum.com/t/query-re-upstreams-and-two-protocols/244861/1 "2016-06-28T18:02:01Z")

</div>

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
