Welcome! Log In Create A New Profile

Advanced

Re: Reverse proxy should send server_name

Mik J via nginx
November 22, 2016 04:30PM
Hello Francis,Thank you very much.Everything works fine. Have a nice week

Le Mardi 22 novembre 2016 21h55, Francis Daly <francis@daoine.org> a écrit :



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

Hi there,

> location ^~ / {
>          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

> 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 ?

Either use "proxy_set_header" (http://nginx.org/r/proxy_set_header) to
set Host (and consider "proxy_redirect" too); or create an "upstream"
called service1.mydomain.org and "proxy_pass" to that.

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

Cheers,

    f
--
Francis Daly        francis@daoine.org



_______________________________________________
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: 313
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