Couldn't output X_FORWARDED_FOR request header by LogFormat directive when RemoteIPHeader directive set it
Issue
We tried to record an original source IP address with a following LogFormat
, but it didn’t work when it is configured in conjunction with RemoteIPHeader
directive. It only outputs "-" for X-Forwarded-For column.
RemoteIPHeader X-Forwarded-For
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %{X-Forwarded-For}i %D" combined
Environment
- Red Hat Enterprise Linux (RHEL)
- JBoss Core Services (JBCS)
- Apache httpd
- 2.4.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.