upstream server does not match virtual host

Francis Daly francis at
Wed Mar 16 16:52:40 UTC 2016

On Wed, Mar 16, 2016 at 07:33:45AM -0400, miky wrote:

Hi there,

> If I understand correctly the documentation I should add
> proxy_set_header Host $host;

What Host: header is sent by the browser to the upstream web server when
things work?

>From the original mail, that seems to be "virt1".

So you want

  proxy_set_header Host virt1;

> Also should I place this proxy_set_header before the proxy_pass ? I think
> yes, could you confirm this ?

Easiest is to say "in the same {}-block as the proxy_pass".

The order of the two within that block does not matter.

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list