<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1479839516195_10192">Hello,</div><div id="yui_3_16_0_ym19_1_1479839516195_27683"><br></div><div id="yui_3_16_0_ym19_1_1479839516195_12133">I don't know how to finalise my reverse proxy setup.</div><div id="yui_3_16_0_ym19_1_1479839516195_12145"><br></div><div id="yui_3_16_0_ym19_1_1479839516195_12178">Client <--Internet-->Reverse_Proxy<--LAN-->Web_Server</div><div id="yui_3_16_0_ym19_1_1479839516195_12179">When a client connects to FQDN, the request is followed to the IP address of the webserver such as</div><div id="yui_3_16_0_ym19_1_1479839516195_12190" dir="ltr">location ^~ / {<br id="yui_3_16_0_ym19_1_1479839516195_14005">         proxy_pass        http://10.1.1.1/service1;</div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_15735">And it works but the request appears is if the client typed http://10.1.1.1/service1/ from the web server point of view<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_17589"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_17593"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_17594">The problem comes when some applications on the web server behind the reverse proxy wants to see the request as if the client typed</div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_25307">http://service1.mydomain.org/</div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_25337"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_25338">I would be tempted to write this on my reverse proxy</div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_25339">location ^~ / {<br id="yui_3_16_0_ym19_1_1479839516195_25343">         proxy_pass        http://10.1.1.1/service1;</div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_25506">But it wouldn't work because the request would be dns solved and not sent to 10.1.1.1<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_25859"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_25860">What should I write on the reverse proxy so that the IP paquet is sent to 10.1.1.1 but the HTTP GET request hits the virtual host service1.mydomain.org on the back end web server ?<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_29417"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_29434">Regards<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_29435"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1479839516195_25300"><a href="http://service1.mydomain.org/;" id="yui_3_16_0_ym19_1_1479839516195_22999" class="edited-link-editor"><br></a></div></div></body></html>