Host header in upstream requests

B.R. reallfqq-nginx at yahoo.fr
Sun Mar 15 00:00:16 UTC 2015


Use variables list to determine what is available to you:
http://nginx.org/en/docs/varindex.html
---
*B. R.*

On Sat, Mar 14, 2015 at 10:12 PM, Sapient Nitro <sapientcloud at gmail.com>
wrote:

> 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 at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20150315/ab3910cf/attachment.html>


More information about the nginx mailing list