Reverse proxy should send server_name

Francis Daly francis at
Tue Nov 22 20:55:31 UTC 2016

On Tue, Nov 22, 2016 at 06:51:28PM +0000, Mik J via nginx wrote:

Hi there,

> location ^~ / {
>          proxy_pass;And it works but the request appears is if the client typed from the web server point of view

> What should I write on the reverse proxy so that the IP paquet is sent to but the HTTP GET request hits the virtual host on the back end web server ?

Either use "proxy_set_header" ( to
set Host (and consider "proxy_redirect" too); or create an "upstream"
called and "proxy_pass" to that.

Note that if your "location" ends in /, you probably want your
"proxy_pass" to end in / too.


Francis Daly        francis at

More information about the nginx mailing list