Docs say $host header comes from the request line?
|Reported by:||Owned by:|
|uname -a:||Darwin alans-mbp.hursley.uk.ibm.com 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64|
|nginx -V:||-bash: nginx: command not found|
These docs http://nginx.org/en/docs/http/ngx_http_core_module.html#var_host say that the $host variable takes its value first from the request line, this is confusing given the request line does not contain a host. I assume this actually means the value of the server_name?
I'm also seeing answers saying that it will take the value of $http_host first, which contradicts the official docs: https://stackoverflow.com/questions/15414810/whats-the-difference-of-host-and-http-host-in-nginx
Which way round actually is it? And where does the value come from when it is not coming from the Host header?