The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

/usr/local/apache/domlogs/IPADDRESS log rotation

Discussion in 'EasyApache' started by vikins, May 19, 2014.

  1. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    90
    Likes Received:
    1
    Trophy Points:
    8
    I am wondering about the log file in /usr/local/apache/domlogs that is named for the IP address of the server. This log file doesn't seem to get rotated properly. How is this controlled?

    For example, the first entry in this file is dated 26/Nov/2013:01:21:48 so clearly it is not being rotated.

    But I have another cPanel server and it had at least rotated the file 22/Apr/2014:14:36:23.

    I am just unsure what the rhyme or reason is for when these are rotated.

    Thanks
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    You shouldn't have a file named after your server's IP in this folder. Do this:

    grep -r $IP /var/cpanel/userdata

    And see which vhost is generating this. The reason it's not getting rotated is that it's not a domain on the server, so the stats runner is not processing it.
     
  3. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    90
    Likes Received:
    1
    Trophy Points:
    8
    Thanks for the suggestion. The command you suggested (yes, I replaced $IP) produced a huge output. The IP in question is the main shared hosting IP.

    I'd be glad to keep trying suggestions.

    Thanks
     
  4. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    Sorry - I was a little distracted when I responded to the post. The IP showing up that much is normal. I should have told you to grep for the log as well:

    grep -r $IP /var/cpanel/userdata |grep target:

    This will show you what vhosts are configured to write to a log file named after an IP.
     
  5. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    90
    Likes Received:
    1
    Trophy Points:
    8
    That returned nothing when I ran it.

    Did you mean something like this?

    grep -r "domlogs/$IP" /var/cpanel/userdata

    But even that returns nothing.
     
  6. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    Yes, to match the line in the conf file that specifies the log path. If nothing in there matches, something else is creating that log. Perhaps try looking for it in httpd.conf to see if you can find the vhost entry in question.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Try browsing to the following directory:

    Code:
    /var/cpanel/userdata/nobody/
    You will likely see a file for the IP address that is not necessary.

    Thank you.
     
  8. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    90
    Likes Received:
    1
    Trophy Points:
    8
    cPanelMichael:
    There is no file in that directory named with the IP. There is one named with the host name of the server, but not the IP.

    My grep would have found this already:
    grep -r "domlogs/$IP" /var/cpanel/userdata

    vanessa:
    My httpd.conf has no entries for "domlogs" hardcoded.

    So, I'm still unsure where it is defined, if it should be there, and if so how to rotate it.
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  10. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    90
    Likes Received:
    1
    Trophy Points:
    8
    /var/cpanel/userdata/nobody/ does show entries for two of the IP addresses assigned to the server (plus a .cache version of each). You say they are unnecessary, does that mean the solution is to remove them?

    What I really want is the logs for the IP addresses to rotate (process) as any other domain logs would.
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    This thread originated in 2014, so it's likely some changes to how this works have occurred. Could you verify if you are currently using EasyApache 3, or EasyApache 4? Also, is "Piped Logging" enabled in "WHM Home » Service Configuration » Apache Configuration » Piped Log Configuration"? If so, it could relate to an internal case, CPANEL-3716, that's resulting in logs for the default VirtualHost to log into a separate access log instead of the primary /usr/local/apache/logs/access_log file.

    I look forward to your response.

    Thank you.
     
  12. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    90
    Likes Received:
    1
    Trophy Points:
    8
    Still using EA3. Piped logging enabled.

    Thanks
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    There's no update to report for case CPANEL-3716 at this time. I'll update this thread with any new information on that case as it becomes available, but I highly recommend considering an upgrade to EasyApache 4 to see if the issue persists.

    Thank you.
     
  14. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    90
    Likes Received:
    1
    Trophy Points:
    8
    EA4 will be in use soon, so hopefully that does take care of it. Thank you.
     
    cPanelMichael likes this.
Loading...

Share This Page