I've a cPanel server that sits behind a web cache device, which means all traffic gets logs as being from that device, not the "real" client IP. The device inserts a custom HTTP header with the "real" client IP, so I need to modify the system-wide httpd.conf with this new format.
I've created a main.local file in /var/cpanel/templates/apache2 as per the documentation, but the line for creating the Apache log is :
When the conf file is compiled, this is expanded to:
What I don't know is where dir.logformat originates from, so I can edit this value with the custom HTTP header so it gets compiled correctly into the final .conf
Cheers
Neil
I've created a main.local file in /var/cpanel/templates/apache2 as per the documentation, but the line for creating the Apache log is :
Code:
LogFormat [% dir.logformat %]
Code:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
Cheers
Neil