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
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to