Rotating /usr/local/apache/domlogs/

a1022

Registered
Oct 14, 2001
4
0
301
My logs are too huge! How can I get Cpanel/WHM to rotate the domlogs daily? I tried editing the /etc/logrotate.conf but that doesn\'t seem to work.

PLEASE HELP! THANK YOU!
 

eva2000

Well-Known Member
Aug 14, 2001
339
16
318
Brisbane, Australia
cPanel Access Level
Root Administrator
Twitter
hey again :)

you need to specify the log rotate lines in /etc/logrotate.d/apache file

[quote:c0e0ad773c]
/home/username/logs/domain.com {
rotate 9
daily
compress
}
[/quote:c0e0ad773c]

delete the large log file first and restart apache before you add the above

i added the extra step to my instructions at http://i4net.tv/marticle/get.php?action=getarticle&articleid=22
 

Brad

Well-Known Member
Aug 16, 2001
231
0
316
This would be a nice feature for Cpanel systems to have the users logs created in their own account directories and Stats to work with this system too.

[quote:7d4d3a4083]hey again :)

you need to specify the log rotate lines in /etc/logrotate.d/apache file

[quote:7d4d3a4083]
/home/username/logs/domain.com {
rotate 9
daily
compress
}
[/quote:7d4d3a4083]

delete the large log file first and restart apache before you add the above

i added the extra step to my instructions at http://i4net.tv/marticle/get.php?action=getarticle&articleid=22

[/quote:7d4d3a4083]
 

myusername

Well-Known Member
PartnerNOC
Mar 6, 2003
693
1
168
chown -R us.*yourbase*
cPanel Access Level
DataCenter Provider
Twitter
The only prolem is disk quota issue on per account basis if they did this larger sites that process a lot of requests can fill up 2 gigs of domlog entries in just a couple to few days.

Perhaps they could work around it to not count against user disk, or better yet allow enabling/disabling stats and domlog rotation options on a per account basis so the user can decide what they want to do from their cPanel.
 
Last edited: