Sapient Nitro
March 14, 2015 05:14PM
Hi,

We are using nginx for load balancing dynamically discovered upstream
endpoints. We are in need to attach upstream hostname as header Host in
upstream requests. For example below is my existing conf extract.

upstream products {
server hostname1:port1;
server hostname2:port2;
}
server {
location /products {
proxy_pass http://products
}
}

All requests are load balanced and working fine. Now we are in need to add
http header "Host: hostnameX" (ex: hostname1 or hostname2, not its IP) in
all requests to upstream. How can we get this done in nginx?

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

Host header in upstream requests

Sapient Nitro March 14, 2015 05:14PM

Re: Host header in upstream requests

B.R. March 14, 2015 08:02PM

Re: Host header in upstream requests

sapientcloud March 15, 2015 10:19AM

Re: Host header in upstream requests

Dmitry Pryadko March 16, 2015 04:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 171
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