Apache override templates installed warning

Miguel G

Well-Known Member
Jun 4, 2015
86
0
6
Spain
cPanel Access Level
Root Administrator
Twitter
Following up this thread

Apache log format issue with EasyApache 4 (apache 2.4), Varnish and mod_remoteip

I currently have 68.0.36 and I get this warning:

This system has the following Apache override templates installed:
  • /var/cpanel/templates/apache2_4/ea4_main.local
I have copied ea4_main.default again and change %h to %a but I still get the warning and logs are not getting the real IP address anymore.
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
7,940
630
263
Houston
cPanel Access Level
DataCenter Provider
Hello,


Where are you receiving that warning? The warning just seems to indicate that you're using a customized template, which in this instance (looking back at the old thread) it appears that you are in order to get the IP address to be viewed correctly.

When you're copying ea4_main.default are you renaming it to main.local as well?


Thank you,
 

Miguel G

Well-Known Member
Jun 4, 2015
86
0
6
Spain
cPanel Access Level
Root Administrator
Twitter
It shows up in the Apache Configuration section. I´m doing as stated in the old thread:

cp /var/cpanel/templates/apache2_4/ea4_main.default /var/cpanel/templates/apache2_4/ea4_main.local

I have replaced %h by %a in LogFormat entries but for some reason I´m not getting the Real IP address as I have last weeks.
 

Miguel G

Well-Known Member
Jun 4, 2015
86
0
6
Spain
cPanel Access Level
Root Administrator
Twitter
Not sure if this was overriden by any update but this seems to work

It seems that configuring the trusted IP proxies for remote ip did the trick:

[email protected] [/root# vi /etc/apache2/conf.modules.d/370_mod_remoteip.conf

Code:
# Enable mod_remoteip
LoadModule remoteip_module modules/mod_remoteip.so

<IfModule remoteip_module>
 # These settings are specific to your environment, so
 # we'll leave them commented out until you manually set
 # them. I recommend carefully reading the documentation
 # as misconfiguration of this module can result in
 # potential data compromise.
 #
 # https://httpd.apache.org/docs/trunk/mod/mod_remoteip.html
 # ---------------------------------------------------------

 RemoteIPHeader X-Forwarded-For
 RemoteIPTrustedProxy XXX.XXX.XXX.XXX

</IfModule>