From 15f167e32a0ed5a0f7b5120a05ff3340ad9471ea Mon Sep 17 00:00:00 2001 From: niten Date: Thu, 23 May 2024 14:40:04 -0700 Subject: [PATCH] Log requests --- immich-ml-container.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/immich-ml-container.nix b/immich-ml-container.nix index cb96aad..f18db6a 100644 --- a/immich-ml-container.nix +++ b/immich-ml-container.nix @@ -46,15 +46,19 @@ in { services.nginx = { enable = true; + 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; + ''; clientMaxBodySize = "1024M"; virtualHosts = genAttrs cfg.hostnames (hostname: { enableACME = false; forceSSL = false; locations."/" = { proxyPass = "http://127.0.0.1:${toString cfg.port}"; - extraConfig = '' - client_max_body_size 1024M; - ''; recommendedProxySettings = true; proxyWebsockets = true; };