diff --git a/hosts/forgejo.nix b/hosts/forgejo.nix index 831e4b5..6d9a789 100644 --- a/hosts/forgejo.nix +++ b/hosts/forgejo.nix @@ -135,6 +135,19 @@ in access_log /var/log/nginx/access.${domain}.log combined_realip; ''; + locations."/awstats/" = { + basicAuthFile = "/secrets/webstats_auth"; + }; + }; + }; + + services.awstats = { + enable = true; + updateAt = "hourly"; + configs."${domain}" = { + logFile = "/var/log/nginx/access.${domain}.log"; + domain = domain; + webService.enable = true; }; };