Reverse proxy should send server_name

Mik J mikydevel at
Tue Nov 22 21:28:51 UTC 2016

Hello Francis,Thank you very much.Everything works fine. Have a nice week 

    Le Mardi 22 novembre 2016 21h55, Francis Daly <francis at> a écrit :

 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list