From 2086b377cfb5565f443c0a47e224cecbdaafad98 Mon Sep 17 00:00:00 2001 From: sandydoo Date: Fri, 28 Apr 2023 07:20:36 +0000 Subject: [PATCH] nixos/nginx: serve the status page on localhost servers The status page is inaccessible by default, unless a virtual host is added with a `server_name` that's not `localhost`. This commit moves the status page configuration, so that it's matched before the main server blocks. --- nixos/modules/services/web-servers/nginx/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index 1e6cb0d37405..f36fe2a4f4f4 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -256,8 +256,6 @@ let ${proxyCachePathConfig} - ${vhosts} - ${optionalString cfg.statusPage '' server { listen ${toString cfg.defaultHTTPListenPort}; @@ -275,6 +273,8 @@ let } ''} + ${vhosts} + ${cfg.appendHttpConfig} }''}