NGINX not passing header to proxy

Francis Daly francis at daoine.org
Wed Jan 2 20:17:45 UTC 2019


On Wed, Jan 02, 2019 at 11:57:51AM -0500, Sesshomurai wrote:

Hi there,

>    Yeah, there might be more going on here that meets the eye. But here are
> the curl commands that are producing different results. I am looking into
> the upstream server as well, but the difference would imply something about
> NGINX is not the same as running curl from command line. 

Correct - nginx and curl make different requests (by default).

If you use "curl -v", it should show the actual request that it makes. If
you enable the debug log in nginx, you might be able to read from it
what request nginx makes.

(Ideally: enable fuller logging on the upstream server and compare the
requests there -- but it sounds like you d not directly control the
upstream server.)

Some differences between nginx and curl which may be important are:

nginx will make a http/1.0 request; curl will make a http/1.1 request.

nginx will not include SNI in the http connection; curl will include it.

If you can easily test things, perhaps try making curl request of
the upstream, using http/1.0 and/or SSLv3 (or some https option that
omits SNI).

If you can find a curl request that fails in the same way that the
nginx request fails, that may point at the nginx config changes that
will allow the nginx request succeed.

Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list