﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
818	error_log host information is confusing	tamere22@…		"Hi,

I think it's a bug because log_format is not possible with error_log, and I get some strange behavior in error_logs.

Say I have 2 virtualhosts named siteA.com and siteB.com that point to my nginx (reverse proxy) both.

I put an access/deny on siteB.com based on IP.
When a remote client connects to siteB with an unauthorized IP, I read in the logs ""host: siteA.com"" or ""host: siteB.com"" randomly.

I think there should be the IP address insted of IP resolution name.

For sample :

2015/10/21 14:23:02 [error] 17272#0: *10420868 access forbidden by rule, client: 81.18.187.142, server: siteB.com, request: ""GET /index.php HTTP/1.1"", host: ""siteA.com""
2015/10/21 14:24:55 [error] 17273#0: *10431600 access forbidden by rule, client: 81.18.187.142, server: siteB.com, request: ""GET /index.php HTTP/1.1"", host: ""siteB.com""

the ""host: "" part is one of my dns alias that target my nginx reverse proxy, and is random each time on the logs. Whereas the ""server :"" part is good and revelant.

"	defect	closed	minor		nginx-core	1.8.x	invalid	error_log		Linux dsi-portal-front-01 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u2 x86_64 GNU/Linux	"nginx version: nginx/1.8.0
built by gcc 4.7.2 (Debian 4.7.2-5)
built with OpenSSL 1.0.1e 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-http_spdy_module --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-z,relro -Wl,--as-needed' --with-ipv6"
