Reverse proxy should send server_name

Mik J mikydevel at yahoo.fr
Tue Nov 22 18:51:28 UTC 2016


Hello,
I don't know how to finalise my reverse proxy setup.
Client <--Internet-->Reverse_Proxy<--LAN-->Web_ServerWhen a client connects to FQDN, the request is followed to the IP address of the webserver such aslocation ^~ / {
         proxy_pass        http://10.1.1.1/service1;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


The problem comes when some applications on the web server behind the reverse proxy wants to see the request as if the client typedhttp://service1.mydomain.org/
I would be tempted to write this on my reverse proxylocation ^~ / {
         proxy_pass        http://10.1.1.1/service1;But it wouldn't work because the request would be dns solved and not sent to 10.1.1.1

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 ?

Regards


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20161122/7937da6f/attachment.html>


More information about the nginx mailing list