Clearing cPanel Error Logs (the one with the cpanel icon Error Log)
On the last shared server i was on the error in this section went away after a day or so and i loved seeing the empty page. :)
But now on this VPS i still have items from august in here. I would love to clear them out... is there a way.
this is the one when you click the icon you see this text and a window under it.
[QUOTE]
This function will display the last 300 errors for your site. This can be very useful for finding broken links or problems with missing files. Checking this log frequently can help keep your site running smoothly.
Last 300 Error Log messages in reverse order:
I have read alot of threads about logs but nothing i found gives me a good answer so far. How do you clear the old ones? via ssh or via whm and where are they? thanks
I have read alot of threads about logs but nothing i found gives me a good answer so far. How do you clear the old ones? via ssh or via whm and where are they? thanks
-
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 -
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 completly0 -
Are you sure that statistics are updating successfully for this account? Are there any errors when running the command I provided? Thank you. 0 -
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 -
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 -
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 -
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 -
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.
Comments
8 comments