Not an Apache expert, but unfortunately am becoming one..
I have 3 web servers sitting behind a load balancer(F5). When one of these web servers reaches out to another server, it is resolving the F5's IP, and not the web server itself.
From what I've gained from this article below, I need to add the XForwardedFor setting to the header, which is done on the LogFormat setting in the config file.
What's written in that forum makes sense, however I need help as there are multiple locations of this LogFormat setting. I have two files which each contain multiples of this setting. I think I may only have to modify httpd.conf file, but I'm not too familiar with Apache. Any help is appreciated. Thanks!!
httpd.conf
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
httdp-DM.conf
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T
I have 3 web servers sitting behind a load balancer(F5). When one of these web servers reaches out to another server, it is resolving the F5's IP, and not the web server itself.
From what I've gained from this article below, I need to add the XForwardedFor setting to the header, which is done on the LogFormat setting in the config file.
What's written in that forum makes sense, however I need help as there are multiple locations of this LogFormat setting. I have two files which each contain multiples of this setting. I think I may only have to modify httpd.conf file, but I'm not too familiar with Apache. Any help is appreciated. Thanks!!
httpd.conf
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
httdp-DM.conf
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T