Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Apache override templates installed warning

Discussion in 'EasyApache' started by Miguel G, Apr 9, 2018.

  1. Miguel G

    Miguel G Well-Known Member

    Joined:
    Jun 4, 2015
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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.
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,137
    Likes Received:
    222
    Trophy Points:
    173
    Location:
    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,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Miguel G

    Miguel G Well-Known Member

    Joined:
    Jun 4, 2015
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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.
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,137
    Likes Received:
    222
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello,


    With your change in place can you rebuild the apache configuration and restart apache? I usually do the following:

    Code:
    mv /etc/apache2/conf/httpd.conf{,.bak}
    /scripts/rebuildhttpdconf
    /scripts/restartsrv_httpd
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Miguel G

    Miguel G Well-Known Member

    Joined:
    Jun 4, 2015
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Twitter:
    I have. Not sure why I am getting the internal IP address on some requests. Should I raise a ticket?
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,137
    Likes Received:
    222
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Miguel G

    Yes, please do open a ticket so we can take a closer look, once it's open please post the ticket number here so we can update this thread with the outcome.

    Thank you,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Miguel G

    Miguel G Well-Known Member

    Joined:
    Jun 4, 2015
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Twitter:
    Ticket 9428125
     
  8. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,137
    Likes Received:
    222
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Thank you @Miguel G I'll post the outcome of that ticket here when it's complete as well.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Miguel G

    Miguel G Well-Known Member

    Joined:
    Jun 4, 2015
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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:

    root@myserver [/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>
     
  10. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,137
    Likes Received:
    222
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Miguel G I'm happy to see that it's working again for you once more!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice