I have a web server which I have clearly not set up properly. One of the users (which webmin makes the owner of most of the sites) has 15G log files (even after the backup copies were removed).
I am aware that these log files should be rotated but not a clue as to how that should be done. If I knew I could just set up a weekly cron job.
They are supposed to end up summarised in //home/USER/public_HTML/stats/ but that is obviously not going right. If I recall the package that is meant to be doing all that is called awstats.
Although How to properly automatically/manually rotate log files for production Rails App was interesting it did not tell me enough to help me solve my own problem.
Short version: How do I set up the log and stats packages to do their job before I run out of disk space?
logrotate -vf /etc/logrotate.d/apache2.conf
, then only that conf file is read and /etc/logrotate.conf is ignored (I use centos 7). This can lead to unexpected behavior. If you want to get consistent results with what the system would do, uselogrotate -vf /etc/logrotate.conf
instead. – user1707322 Sep 19 '19 at 13:33