Re: Intended behavior for Host header in Proxy scenario

2018-11-23 Thread Maxim Dounin
Hello! On Fri, Nov 23, 2018 at 04:33:33PM +0100, Jack Henschel wrote: > On 11/23/18 3:11 PM, Maxim Dounin wrote: > > Hello! > > > > On Fri, Nov 23, 2018 at 09:23:01AM +0100, Jack Henschel wrote: > > > >> Hi Maxim, > >> > >> thanks for the quick confirmation! > >> > >>> The Host header is set to

Re: Intended behavior for Host header in Proxy scenario

2018-11-23 Thread Jack Henschel
On 11/23/18 3:11 PM, Maxim Dounin wrote: > Hello! > > On Fri, Nov 23, 2018 at 09:23:01AM +0100, Jack Henschel wrote: > >> Hi Maxim, >> >> thanks for the quick confirmation! >> >>> The Host header is set to what you wrote in the "proxy_pass" >>> by default. That is, it will be "backend" with th

Re: Intended behavior for Host header in Proxy scenario

2018-11-23 Thread Maxim Dounin
Hello! On Fri, Nov 23, 2018 at 09:23:01AM +0100, Jack Henschel wrote: > Hi Maxim, > > thanks for the quick confirmation! > > > The Host header is set to what you wrote in the "proxy_pass" > > by default. That is, it will be "backend" with the above > > configuration. > > Wouldn't it make m

Re: Intended behavior for Host header in Proxy scenario

2018-11-23 Thread Jack Henschel
Hi Maxim, thanks for the quick confirmation! > The Host header is set to what you wrote in the "proxy_pass" by default. > That is, it will be "backend" with the above configuration. Wouldn't it make more sense to use the hostname from the particular upstream server? I see two scenarios where

Re: Intended behavior for Host header in Proxy scenario

2018-11-22 Thread Maxim Dounin
Hello! On Thu, Nov 22, 2018 at 09:11:59PM +0100, Jack Henschel wrote: > Hello everyone, > > during my last debugging session with Nginx I was wondering how and when > exactly Nginx passes upstream's hostname when proxying a request. > > In particular, I have the following example: > > upstream

Intended behavior for Host header in Proxy scenario

2018-11-22 Thread Jack Henschel
Hello everyone, during my last debugging session with Nginx I was wondering how and when exactly Nginx passes upstream's hostname when proxying a request. In particular, I have the following example: > upstream backend { > server a.example.com:443; > server b.example.com:443; > } > server {