Invalid "host" information in access and error logs
Valentin V. Bartenev
vbart at nginx.com
Wed Oct 28 13:46:45 UTC 2015
On Wednesday 28 October 2015 14:36:15 tamere22 wrote:
> Hi,
>
> My message is referring to this bug report : https://trac.nginx.org/nginx/ticket/818#comment:6
>
> The person answering me told me to come talk here about this.
>
> I don't understand his answers, as "How nginx processes a request" page states
>
> "In this configuration nginx tests only the request’s header field “Host” to determine which server the request should be routed to"
>
> Well first of all, I m pretty sure that there is no error in nginx routing because I get the good access logs for the good sites. It's just that "host" field in access logs is completly random whereas "server" field is ok.
>
> Please review my bug report, it contains sampl configurations.
>
> Someone can explain me why I get random "host" information in access logs ?
>
[..]
The "host" in your access logs is exactly what the client has sent in headers.
So, if the client sends random hosts, and all of them handled in your default
server, then you will see these hosts in access log for that server.
wbr, Valentin V. Bartenev
More information about the nginx
mailing list