Welcome! Log In Create A New Profile

Advanced

Reverse proxy should send server_name

Mik J via nginx
November 22, 2016 01:52PM
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


_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Reverse proxy should send server_name

Mik J via nginx November 22, 2016 01:52PM

Re: Reverse proxy should send server_name

Francis Daly November 22, 2016 03:58PM

Re: Reverse proxy should send server_name

Mik J via nginx November 22, 2016 04:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 265
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready