NGINX not passing header to proxy

Sesshomurai nginx-forum at forum.nginx.org
Thu Jan 3 23:17:44 UTC 2019


Hi,
  This problem was resolved with the help of the cloud provider. Turns out I
need to set the Host header

proxy_set_header Host upstreamhostname;

It wasn't exactly clear any any docs (on their end) this was necessary but
glad it's solved and makes some sense as well I suppose.

Thanks for all your suggestions Francis.

Francis Daly Wrote:
-------------------------------------------------------
> 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
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,282518,282540#msg-282540



More information about the nginx mailing list