Apache access log host header does not match host in original request
Issue
- Using
%{Host}i %in the access log format to log the host header:
LogFormat "%{Host}i %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" custom
- Requests with two different
Hostheaders is made:
curl -H 'Host: aaa.example.com' "http://1.2.3.4/"
curl -H 'Host: bbb.example.com' "http://1.2.3.4/"
- Onely one host (aaa.example.com) logged in the access log, despite different Hosts in the requests:
aaa.example.com ::1 - - [04/Nov/2015:14:08:05 -0500] "GET / HTTP/1.1" 403 3985 "-" "curl/7.29.0"
aaa.example.com ::1 - - [04/Nov/2015:14:09:11 -0500] "GET / HTTP/1.1" 403 3985 "-" "curl/7.29.0"
Environment
- Red Hat Enterprise Linux
- Apache httpd
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.