From c2370eddb1aa21fe0b38d6b0d40ee1046e8b2ca1 Mon Sep 17 00:00:00 2001 From: niten Date: Fri, 24 May 2024 10:39:44 -0700 Subject: [PATCH] Log requests --- immich-ml-container.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/immich-ml-container.nix b/immich-ml-container.nix index 9f008f5..fc8db86 100644 --- a/immich-ml-container.nix +++ b/immich-ml-container.nix @@ -55,6 +55,13 @@ in { services.nginx = { enable = true; clientMaxBodySize = "1024M"; + commonHttpConfig = '' + log_format with_response_time '$remote_addr - $remote_user [$time_local] ' + '"$request" $status $body_bytes_sent ' + '"$http_referer" "$http_user_agent" ' + '"$request_time" "$upstream_response_time"'; + access_log /var/log/nginx/access.log with_response_time; + ''; virtualHosts = genAttrs cfg.hostnames (hostname: { enableACME = false; forceSSL = false;