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 logs not rotating

Discussion in 'EasyApache' started by rene123, Apr 11, 2010.

  1. rene123

    rene123 Active Member

    Joined:
    Feb 20, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    51
    My apache logs under /usr/local/apache/logs (CentOS) does not rotate correctly. Sooner or later access_log, suexec_log or error_log grow to 2gb and then Apache crash and won't start. I do the rotating manually right now but it would be nice not to do that..

    How do I solve this?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. kuldeep_nikam

    kuldeep_nikam Member

    Joined:
    Apr 10, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    51
    cPanel provides feature to Configure log rotation.

    Login to WHM as root and go to Main >> Service Configuration >> cPanel Log Rotation Configuration

    Here you will see all option including error_log to rotate.
    Check box the option as per your requirement and select save.

    This will rotate all the logs that you have selected.

    Hope this helps :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. rene123

    rene123 Active Member

    Joined:
    Feb 20, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    51
    Yes I know, access_log is checked there but it does not rotate. Plus option for the suexec_log is not available there...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #3 rene123, Apr 11, 2010
    Last edited: Apr 11, 2010
  4. MikeDVB

    MikeDVB Well-Known Member
    PartnerNOC

    Joined:
    Jun 4, 2008
    Messages:
    218
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Indiana, USA
    I would suggest opening a ticket if you have them set to rotate and they do not.

    As far as the error_log - you could go through it and see what's causing it to build up and potentially resolve some of those issues to help resolve that as well.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. rene123

    rene123 Active Member

    Joined:
    Feb 20, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    51
    I rent my cPanel so that not possible for me...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. ant-cloudabove

    ant-cloudabove Registered

    Joined:
    Apr 12, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    You should still be able to open a ticket but the response times aren't as fast
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. xerophyte

    xerophyte Well-Known Member

    Joined:
    Mar 16, 2003
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Canada
    I might be wrong, but i think above configuration only allow to rotate the /usr/local/cpanel/logs not apache logs in /usr/local/apache/logs

    You can configure the logrotate to rotate the logs in /usr/local/apache/logs

    take look at
    /etc/logrotate.d/httpd for example
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. MikeDVB

    MikeDVB Well-Known Member
    PartnerNOC

    Joined:
    Jun 4, 2008
    Messages:
    218
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Indiana, USA
    You are on a VPS or Dedicated or Shared?

    If you're on VPS or Dedicated you can definitely submit a ticket to cPanel.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,544
    Likes Received:
    9
    Trophy Points:
    268
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Did you enable rotation for the applicable Apache logs via WHM? Here is the correct WHM menu path: WHM: Main >> Service Configuration >> Apache Configuration >> Log Rotation

    Please keep in mind that the aforementioned log rotation will only occur for logs that reach the configured threshold; by default this is for logs that are 300 MB in size or greater, as configured via the Tweak Settings page in WHM: WHM: Main >> Server Configuration >> Tweak Settings >> Stats and Logs
    • Threshold in megabytes above which cpanellogd will rotate log files configured for log rotation. (Minimum 10MB)

    If there is still difficulty, please check to ensure the system is updated to the latest cPanel build and version as seen via the following resource: http://httpupdate.cpanel.net/#builds
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. rene123

    rene123 Active Member

    Joined:
    Feb 20, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    51
    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