Re: proxying to upstream port based on scheme

2016-10-05 Thread Edho Arief
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 > > > >

Re: proxying to upstream port based on scheme

2016-10-05 Thread Valentin V. Bartenev
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 > > The following does the trick > > # > if ( $scheme = http

proxying to upstream port based on scheme

2016-10-05 Thread Anoop Alias
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 The following does the trick # if ( $scheme = https ) { set $port 4430; } if ( $scheme = http ) { set $port ; }