Results 1 to 1 of 1
-
16th Jun 2014, 12:45 PM #1
Fix Log Rotation Problems cPanel
Since the beginning of time, cPanel has had logs that it simply does not rotate properly. Why this has been an ongoing problem that has never been fixed is beyond me, but it CAN be fixed and we'll go through what is needed to accomplish this.
The most important logs that are missed are the Apache system logs that are located in /usr/local/apache/logs. SSH into your server as root.
Code:pico /etc/logrotate.d/httpd
The first line should read:
Code:/usr/local/apache/logs/*log {
Code:/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
Code:/bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
The next log file that needs to be dealt with is /var/log/xferlog. This is your FTP transfer log.
Code:pico /etc/logrotate.d/ftp
/var/log/xferlog {
postrotate /bin/kill -HUP `cat /var/proftpd.pid 2> /dev/null` 2> /dev/null || true
endscript
missingok
}
/var/log/xferlog {
postrotate /bin/kill -HUP `cat /var/run/pure-ftpd.pid 2> /dev/null` 2> /dev/null || true
endscript
missingok
}
pico /etc/logrotate.conf
/var/log/securedomain.tld {
weekly
rotate 1
}
One other stray log that cPanel ignores is /var/log/chkservd.log. Add this section to the same file (/etc/logrotate.conf) that you were just editing:
/var/log/chkservd.log {
weekly
rotate 1
}
/usr/local/cpanel/logs/stats_log {
weekly
rotate 1
}
/usr/local/cpanel/logs/access_log {
weekly
rotate 1
}
/usr/local/cpanel/logs/error_log {
weekly
rotate 1
}Areon Reviewed by Areon on . Fix Log Rotation Problems cPanel Since the beginning of time, cPanel has had logs that it simply does not rotate properly. Why this has been an ongoing problem that has never been fixed is beyond me, but it CAN be fixed and we'll go through what is needed to accomplish this. The most important logs that are missed are the Apache system logs that are located in /usr/local/apache/logs. SSH into your server as root. pico /etc/logrotate.d/httpd (on some servers this file is called apache) The first line should read: Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Coder/Programmer to fix my Site problem
By Jayzzy in forum Completed TransactionsReplies: 0Last Post: 23rd Aug 2011, 08:32 PM -
How to fix fctrl.exe problem on windows 7?
By shufol in forum Technical Help Desk SupportReplies: 6Last Post: 12th Aug 2011, 06:43 AM -
DLE random log out problem
By seraphim in forum Webmaster DiscussionReplies: 0Last Post: 12th May 2011, 01:36 PM -
Trusted webmaster needed to fix my dashboard problem
By bitan in forum Community CooperativeReplies: 1Last Post: 6th Dec 2010, 06:00 PM -
Fix the cookie problem in vB
By Royal King in forum Tutorials and GuidesReplies: 5Last Post: 7th Feb 2010, 02:28 PM
themaPoster - post to forums and...
Version 5.22 released. Open older version (or...