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!

SOLVED custom log settings in userdata conf file not working

Discussion in 'General Discussion' started by carock, Jun 27, 2018.

  1. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    256
    Likes Received:
    5
    Trophy Points:
    168
    Location:
    St. Charles, MO
    I have sites behind a web firewall, so the access logs show that one IP.

    I have the firewall configured to use X-Forwarded-For header to relay the real client IP.

    I configured a customer userdata config file setting to create the log format.

    Following the instructions Modify Virtualhost Containers With Include Files - EasyApache - cPanel Documentation

    And tailing the log, it isn't logging with the new format.

    Here's what I have in the userdata config file.

    LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined-waf
    CustomLog /etc/apache2/logs/domlogs/website.com combined-waf

    Any ideas?

    Thanks,
    Chuck
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    256
    Likes Received:
    5
    Trophy Points:
    168
    Location:
    St. Charles, MO
    Somewhere in those it started working.

    I did all of the things in those links and it wasn't working. I went to lunch and when I came back it was working. ??

    Thank you for the help
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @carock,

    I'm glad to see it worked out. Let us know if you have any additional questions.

    Thanks!
     
    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