Invalid "host" information in access and error logs

Shane Duffield shaneduffield at
Wed Oct 28 13:58:55 UTC 2015

Wrong email... I am not able to answer your query! Sorry

-----Original Message-----
From: nginx [mailto:nginx-bounces at] On Behalf Of Valentin V. Bartenev
Sent: 28 October 2015 15:47
To: nginx at
Subject: Re: Invalid "host" information in access and error logs

On Wednesday 28 October 2015 14:36:15 tamere22 wrote:
> Hi,
> My message is referring to this bug report : 
> 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

nginx mailing list
nginx at

More information about the nginx mailing list