proxying to upstream port based on scheme
Edho Arief
me at myconan.net
Wed Oct 5 15:36:21 UTC 2016
Hi,
On Thu, Oct 6, 2016, at 00:32, Valentin V. Bartenev wrote:
> On Wednesday 05 October 2016 18:34:06 Anoop Alias wrote:
> > I have an httpd upstream server that listen on both http and https at
> > different port and want to send all http=>http_upstream and https =>
> > https_upstream
> >
>
> Why don't use map?
>
> map $scheme $port {
> http 9999;
> https 4430;
> }
>
>
> proxy_pass $scheme://127.0.0.1:$port;
>
>
or two separate server block...
More information about the nginx
mailing list