Skip to main content

Clearing cPanel Error Logs (the one with the cpanel icon Error Log)

Comments

8 comments

  • cPanelMichael
    Hello :) Browse to the "Stats and Logs" tab in "WHM Home " Server Configuration " Tweak Settings" and ensure the following option is enabled: "Delete each domain"s access logs after stats run" Then, if you don't want to wait for the next stats run, update the statistics for the user manually via: /scripts/runweblogs $username
    Thank you.
    0
  • durangod
    Hi, is there a step 2 because that was already enabled? i did change this [QUOTE] Log rotation size threshold (Minimum: 10)
    from 300 to 10 but everything else on this page looks good. But i dont think that setting is going to do it because it wont clean it out completly
    0
  • cPanelMichael
    Are you sure that statistics are updating successfully for this account? Are there any errors when running the command I provided? Thank you.
    0
  • durangod
    hi, just pm'd you the run, no error that i can see, but i still have all that stuff in there even after that..
    0
  • cPanelMichael
    I was under the impression you were referring to the "Latest Visitors" option, and thus my instructions were directed towards that. I see now you are referring to the option called "Error Log" within cPanel. This data comes directly from: /usr/local/apache/logs/error_log
    You would have to manually empty the log file with a command such as: echo "" > /usr/local/apache/logs/error_log
    Or, configure a lower threshold for "Log rotation size threshold" under "Stats and Logs" in "WHM Home " Server Configuration " Tweak Settings" and then ensure the Error Log is included in "WHM Home " Service Configuration " Apache Configuration " Log Rotation". Thank you.
    0
  • durangod
    ok well that gets me half way there.. thanks... at least i have a direction, appreciate that very much... I have a email into my old host to see how he had it set up. I doubt very seriously if he did that manually, i know him and he would never take the time to do that all the time for all the accounts. He had to of had some special automated way. Because i remember i would have an error and then fix it, and then it seemed in a few hours or by the next day at least, it was clean, nothing in it. So there must be a way to set that up automated.. :)
    0
  • cPanelMichael
    If the log threshold is set to a very low level, then it would likely rotate much sooner. Note that errors are generally helpful and it's often better to address what's causing the error log to fill up in the first place. Thank you.
    0
  • durangod
    ok we will see how it goes, i will leave it as is for now to see how it rotates, i have quite a bit of config deny set up so it wont take that long to find out.... by the way its clean now and thanks, im so glad i did not have to do that per account... :) appreciate it
    0

Please sign in to leave a comment.