Looks like I have found an issue with Apache logging when httpd is used as a forward proxy.
ProxyRequests On
ProxyVia On
I use %U and %q in my LogFormat, This happens only when I use my httpd as a proxy in my browser.
LogFormat "{\"remote_host\":\"%h\",\"time\":\"%t\",\"server_name\":\"%V\",\"request_method\":\"%m\",\"request_protocol\":\"%H\",\"server_url\":\"%U\",\"query_string\":\"%q\",\"content_type\":\"%{Content-Type}o\",\"status\":\"%s\",\"status_final\":\"%>s\",\"bytes_response_no_headers\":\"%B\",\"bytes_received\":\"%I\",\"bytes_sent\":\"%O\",\"time_to_serve_microseconds\":\"%D\",\"time_to_serve_seconds\":\"%T\",\"keepalives_handled\":\"%k\",\"referer\":\"%{Referer}i\",\"user-agent\":\"%{User-Agent}i\"}" combinedjson
I end up seeing this in the logs.
{"remote_host":"::1","time":"[23/Nov/2015:12:58:04 -0500]","server_name":"<myhost name>.com","request_method":"GET","request_protocol":"HTTP/1.1","server_url":"<myhost name>.com:90/test.html?a=alpha&b=beta","query_string":"?a=alpha&b=beta","content_type":"text/html","status":"404","status_final":"404","bytes_response_no_headers":"207","bytes_received":"361","bytes_sent":"487","time_to_serve_microseconds":"11983","time_to_serve_seconds":"0","keepalives_handled":"0","referer":"-","user-agent":"Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0"}
If I hit the httpd site directly, the log is correct.
{"remote_host":"192.168.xx.xx","time":"[23/Nov/2015:13:06:21 -0500]","server_name":"<myhost name>.com","request_method":"GET","request_protocol":"HTTP/1.1","server_url":"/test.html","query_string":"?a=alpha&b=beta","content_type":"text/html","status":"404","status_final":"404","bytes_response_no_headers":"207","bytes_received":"339","bytes_sent":"463","time_to_serve_microseconds":"548","time_to_serve_seconds":"0","keepalives_handled":"0","referer":"-","user-agent":"Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0"}
%U is not supposed to have the query string in it.
This happens with 2.2.29 as well.
If this is reported earlier, please ignore. If I have done it wrong, please let me know.
Thanks.
Pasha