Keeping web sites access logs

flashweb

Well-Known Member
Mar 13, 2003
255
2
168
cPanel Access Level
Root Administrator
Hi,

Web sites access logs are rotated everyday.

/usr/local/apache/domlogs

Is it possible for me to configure cpanel server so that Apache Logs are kept some days (example 10 days) then delete them ? This way if some sites got hacked, we can check old Apache log files.

Regards,

Yujin
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,465
30
473
Go on, have a guess
cPanel doesn't use logrotate to rotate the domlogs as you've discovered. They're rotated by the logrunner process which is controlled by the WHM > Tweak Settings:

Delete each domain's access logs after stats run
Keep log files at the end of the month (default is off as you can run out of disk space quickly)

That's about as much control as you have.
 

mambovince

Well-Known Member
Jan 15, 2005
193
0
166
London, UK
chirpy said:
cPanel doesn't use logrotate to rotate the domlogs as you've discovered. They're rotated by the logrunner process which is controlled by the WHM > Tweak Settings:

Delete each domain's access logs after stats run
Keep log files at the end of the month (default is off as you can run out of disk space quickly)
What if client sets in their own cPanel "Raw Log Manager"
1. Archive Logs in your home directory at the end of each stats run [every 1 day(s)]

Does that over-ride whatever we set in WHM?

They can also set:
2. Remove the previous month's archived logs from your home directory at the end of each month

But we cannot seem to set this in WHM

- Vince
 

zonzo

Registered
Nov 12, 2006
1
0
151
What if client sets in their own cPanel "Raw Log Manager"
1. Archive Logs in your home directory at the end of each stats run [every 1 day(s)]

Does that over-ride whatever we set in WHM?

They can also set:
2. Remove the previous month's archived logs from your home directory at the end of each month

But we cannot seem to set this in WHM

- Vince
Can somebody help me with this?
My logs are now increasing each month. I want to turn off "keep stats logs... " in WHM.
But I don't want that clients in Cpanel will not have archived logs.

Are those settings overriding each other or what?

In short: I want that client get a new log file each month & archived one for past month & I don't have too keep "Keep stats logs..." setting to ON in WHM.

Sorry my english.