Control Web Panel
WebPanel => Installation => Topic started by: changlee on December 06, 2023, 04:07:37 PM
-
I created the config (https://gcdnb.pbrd.co/images/yGqAnzUhdSDR.png?o=1) but when I run it, I get: No such file or directory at every line.
My logs are getting huge. Please advise.
-
You have to put the full path to the log files in the logrotate config. Please post the contents of that file...
-
I created that file:
# Logrotate CWP
/usr/local/apache/domlogs/*.log {
compress
delaycompress
daily
missingok
}
/usr/local/apache/logs/*.log {
compress
delaycompress
daily
missingok
}
-
Did you create the file manually via a shell or did you use the CWP built-in facility?
https://fornex.com/en/help/logrotate-centos-7/ (https://fornex.com/en/help/logrotate-centos-7/)
-
Your missing the very important part. You need a "rotate" option for how many files to keep. Add " rotate 1 " as an option and it might work.
-
I understand nothing. I ask for paid support for a) Updates and b) log space cleaning. I think CWP will need to improve to that.
-
Change your files to:
# Logrotate CWP
/usr/local/apache/domlogs/*.log {
compress
delaycompress
daily
missingok
rotate 1
}
/usr/local/apache/logs/*.log {
compress
delaycompress
daily
missingok
rotate 1
}
-
Is that official please? Have you tried that? Thanks for the help.
-
Try it and find out if it works. But I know that if logrotate doesn't have a number of backups to keep, it will fail. Hence why all that was added is "rotate 1", which tells it to keep ONLY 1 backup. If you need more days, increase that number.