No Upstream Proxy Headers

Kilian Ries mail at kilian-ries.de
Mon Sep 4 20:46:48 UTC 2017


Hello,



i'm running a nginx (version: nginx/1.13.1) with two vhosts with exact the same configuration. The only difference is the upstream section: each vhosts points to a different upstream server / ip.



My configuration looks like this:



###

...

location / {

            proxy_pass http://IP_ADDRESS;

            proxy_set_header Host                   $host;

            proxy_set_header X-Real-IP       $proxy_protocol_addr;

            proxy_set_header X-Forwarded-For $proxy_protocol_addr;

}

...

###



vhost_1 works without any problem and i can see both proxy_headers in the tcpdump and in my upstream-apache access-logs.



vhost_2 doesn't show me any x-forwarded headers, whether in the upstream-apache nor in the tcpdump (which is running locally on my nignx host). So it looks like when apache doesn't attach the upstream_headers to the HTTP request.



Additionally i can see via tcpdump that HTTP protocol (get request) to vhost_2 (borken) is 1.0 and to vhost_1 (working) is 1.1; However, both responses are 1.1 so both upstream-apaches are capable of HTTP 1.1.



Does somebody know why my nginx is sending its HTTP request to vhost_2 via HTTP 1.0 and not 1.1? And if, could that be that HTTP 1.0 is not working with proxy_set_header?



Thats the only difference im seeing in my setup / tcpdump ... could there be any other difference why nginx is not attaching the upstream headers to my vhost_2?



Thanks

Greets

Kilian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170904/703f1500/attachment.html>


More information about the nginx mailing list