Control Web Panel
WebPanel => Apache => Topic started by: gailclark80 on April 25, 2021, 01:12:03 AM
-
I found that the apache log file is too large, how to clear the log? how to make the apache log save a file every day by date?
/usr/local/apache/domlogs/mydomain.log-5.1GB
/usr/local/apache/logs/access_log-4.5GB
/usr/local/apache/logs/suphp_log-3.6GB
I changed suphp_log to suphp_log-, and then changed it to suphp_log. Now the modification time of suphp_log has not changed for a long time, indicating that the system no longer uses suphp_log. How do I fix it?
-
setup logorotate for dom logs and apache logs
/usr/local/apache/domlogs/*.log /usr/local/apache/logs/*.log /usr/local/apache/logs/*_log {
daily
missingok
rotate 30
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
/bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
/bin/kill -USR1 `cat /run/nginx.pid 2>/dev/null` 2>/dev/null || true
endscript
}
thiis will make smaler flies that you can remove after you dont need - keeping last 20-30 days if needed
-
Hi all,
I noticed that by deleting the logs in "/usr/local/apache/domlogs/", the statistics application "goaccess" does not show the statistics.
My question is: is there a way to clear these logs without goaccess stopping working?
for example awstats reads the logs every night, and the rotate doesn't bother him and I wanted to understand if there was the possibility of doing the same thing with goaccess as well.
I don't want to leave too large logs on the system without being able to rotate them, but I also don't want an application like goaccess to stop working.
Does anyone have a solution?
Thanks
Claudio