From c554108bc77cf15cd8e07bcc54b015896e267c03 Mon Sep 17 00:00:00 2001 From: clerie Date: Wed, 15 Mar 2023 21:00:53 +0100 Subject: [PATCH] hosts/web-2: configure logging for ip.clerie.de --- hosts/web-2/ip.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hosts/web-2/ip.nix b/hosts/web-2/ip.nix index 0a11463..bde306b 100644 --- a/hosts/web-2/ip.nix +++ b/hosts/web-2/ip.nix @@ -5,7 +5,7 @@ "ip.clerie.de" = { enableACME = true; forceSSL = true; - locations."/" = { + locations."= /" = { return = ''200 ' @@ -53,28 +53,37 @@ types { } default_type "text/html; charset=utf-8"; ''; }; + extraConfig = '' + access_log /var/log/nginx/ip.clerie.de.log vcombined_anon; + ''; }; "ip4.clerie.de" = { enableACME = true; addSSL = true; - locations."/" = { + locations."= /" = { return = ''200 "$remote_addr\n"''; extraConfig = '' types { } default_type "text/plain; charset=utf-8"; add_header Access-Control-Allow-Origin *; ''; }; + extraConfig = '' + access_log /var/log/nginx/ip.clerie.de.log vcombined_anon; + ''; }; "ip6.clerie.de" = { enableACME = true; addSSL = true; - locations."/" = { + locations."= /" = { return = ''200 "$remote_addr\n"''; extraConfig = '' types { } default_type "text/plain; charset=utf-8"; add_header Access-Control-Allow-Origin *; ''; }; + extraConfig = '' + access_log /var/log/nginx/ip.clerie.de.log vcombined_anon; + ''; }; }; }