How restrict site access log size?

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 found from litespeed Vhost configs but some reason settings there not honored.
There was rolling size 10m and keep 10day default, but my logs was much bigger and many month old… I just disabled logging now, that seems to be better option that have 5GB access logs.

I never had that issue, stuff in /home/ 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, 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…

IncScheduler deleting non rolling logs.

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.