<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">Use variables list to determine what is available to you:<br><a href="http://nginx.org/en/docs/varindex.html">http://nginx.org/en/docs/varindex.html</a><br></div><div class="gmail_extra"><div><div class="gmail_signature"><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font></div></div>
<br><div class="gmail_quote">On Sat, Mar 14, 2015 at 10:12 PM, Sapient Nitro <span dir="ltr"><<a href="mailto:sapientcloud@gmail.com" target="_blank">sapientcloud@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>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.<br><br>upstream products {<br> server hostname1:port1;<br> server hostname2:port2;<br>}<br>server {<br> location /products {<br> proxy_pass <a href="http://products" target="_blank">http://products</a><br> }<br>}<br><br>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?<br><br>Regards<br></div>
<br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div></div>