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.

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:
    1
    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?
     
  2. kuldeep_nikam

    kuldeep_nikam Member

    Joined:
    Apr 10, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    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 :)
     
  3. rene123

    rene123 Active Member

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

    MikeDVB Well-Known Member
    PartnerNOC

    Joined:
    Jun 4, 2008
    Messages:
    212
    Likes Received:
    3
    Trophy Points:
    18
    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.
     
  5. rene123

    rene123 Active Member

    Joined:
    Feb 20, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    I rent my cPanel so that not possible for me...
     
  6. ant-cloudabove

    ant-cloudabove Registered

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

    xerophyte Well-Known Member

    Joined:
    Mar 16, 2003
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  8. MikeDVB

    MikeDVB Well-Known Member
    PartnerNOC

    Joined:
    Jun 4, 2008
    Messages:
    212
    Likes Received:
    3
    Trophy Points:
    18
    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.
     
  9. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    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
     
  10. rene123

    rene123 Active Member

    Joined:
    Feb 20, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
Loading...

Share This Page