How to keep more months of apache logs archive?

Scott Galambos

Well-Known Member
Jul 13, 2016
90
3
8
Canada
cPanel Access Level
Root Administrator
I'm running cPanel v72.0.7. Its keeping the the current and past months raw apache log files in a given users /home/user/logs directory. eg.

server(/home/user/logs): ls -l
total 212M
drwx------ 2 do180 do180 28K Aug 14 08:32 ./
drwx--x--x 20 do180 do180 4.0K Jul 31 17:01 ../
-rw-r--r-- 1 user user 105K Aug 14 08:32 site1.user.com-Aug-2018.gz
-rw-r--r-- 1 user user 53K Aug 14 08:32 site1.user.com-ssl_log-Aug-2018.gz
-rw-r--r-- 1 user user 2.3K Aug 14 08:32 site2.user.com-Aug-2018.gz
-rw-r--r-- 1 user user 154 Aug 12 08:46 site2.user.com-ssl_log-Aug-2018.gz
-rw-r--r-- 1 user user 154 Aug 12 08:46 siet2.user.com-ssl_log-Jul-2018.gz

How can I configure cPanel/WHM to simply keep more months? I want it to go back like 6 months, not just 2. I can't find specifically where this is in WHM.
 

sysnishit

Active Member
Aug 13, 2018
25
3
3
Internet
cPanel Access Level
Root Administrator
Hello,

You can configure it from WHM > server configuration > Tweak Settings >>> Stats and Logs > Here you can configure it as per your requirement.

Delete each domain’s access logs after statistics are gathered > turn it off
Remove the previous month's archived logs from the user's ho.... > turn if off.
 

Scott Galambos

Well-Known Member
Jul 13, 2016
90
3
8
Canada
cPanel Access Level
Root Administrator
Hello,

You can configure it from WHM > server configuration > Tweak Settings >>> Stats and Logs > Here you can configure it as per your requirement.

Delete each domain’s access logs after statistics are gathered > turn it off
Remove the previous month's archived logs from the user's ho.... > turn if off.

Thanks. To confirm though, the issue with this is I will have archived .gz log files for all months piling up in /home/user/logs now correct? And its up to me to manually delete anything over x months correct?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,257
313
Houston
Hello

@midnightcafe is exactly correct about this. We'll remove them after a month but if you have that option deselected you'll need to manage their removal.

Thanks!