Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1587

Can I use both HTTP and HTTPS in nginx upstream?

$
0
0

I have Nginx config as below:

upstream staging {    server myappstaging.somedomain.com;}upstream prod {    server myapp.somedomain.com:443;}# map to different upstream backends based on headermap $http_x_server_select $pool {    default "prod";    staging "staging";}server {    listen 80;    server_name myapp.mydomain.com;    location / {        proxy_pass https://$pool;    }}

I want to forward requests with x-server-select header set to staging to http://myappstaging.somedomain.com and for prod to https://myapp.somedomain.com:443

Is it possible do that with Nginx ?


Viewing all articles
Browse latest Browse all 1587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>