nginx: Reduce number of rotated logs kept around

pull/92/head
Tristan Daniël Maat 2023-10-13 10:16:10 +02:00
parent eb3bd485c4
commit 95b5d4b3bd
Signed by: tlater
GPG Key ID: 49670FD774E43268
1 changed files with 15 additions and 10 deletions

View File

@ -153,7 +153,12 @@
services.logrotate = {
enable = true;
settings = lib.mapAttrs' (virtualHost: _:
settings =
{
# Override the default, just keep fewer logs
nginx.rotate = 6;
}
// lib.mapAttrs' (virtualHost: _:
lib.nameValuePair "/var/log/nginx/${virtualHost}/access.log" {
frequency = "daily";
rotate = 2;