Is there somehow to set max size for site access logs?
I just did manually delete 6 sites access log content on one server, that cleaned over 5GB space from server.
Is there somehow to set max size for site access logs?
I just did manually delete 6 sites access log content on one server, that cleaned over 5GB space from server.
I never had that issue, stuff in /home/site.com/logs gets rolled at around 10mb. What I had an issue with, is the logs in /usr/local/lsws/logs/ which just accumulate, actually if you look at IncScheduler.py, if the disk get too full ( >80% ), it will just delete everything in that folder. I’m not sure what the logic is behind since modsecurity log gets huge. They know it’s not exactly the best way to do it…
For /usr/local/lsws/logs/ I made snippet below on Termius what I run once a month or when ever I remember to clean.
cd /usr/local/lsws/logs
> error.log
> access.log
> auditmodsec.log
> modsec.log
> stderr.log
> lsrestart.log
For crazy size journal I did: journalctl --vacuum-size=100M to keep that reasonable size.
I personally just put them in logrotate.d, I don’t want to remember that stuff, not sure what they were thinking for this, I might even just delete them after X days. It’s weird because they put it in code that they acknowledge it’ll fill your disk eventually.