Yesterday I wrote a small #shell script to rename a file with its modified date with auto cleanup for files with that pattern older than 30 days and set up a #cronjob for services which dont support dynamic log locations.

This way my 260MB #nginx file will never become that big again and I can open the logfiles again.

Follow

@Anachron
I use logrotate from void-packages and a config file for using it with nginx I've snatched from my old Debian box and modified slightly to suit my needs.
Kinda overkill just for nginx, but in case the need to handle some other logs outside of socklog facilities arises — I already have it.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml