From 05ed364b26e89d3b997754c81b00fcd0bdbf51b2 Mon Sep 17 00:00:00 2001 From: Bryan Ramos Date: Thu, 12 Mar 2026 05:01:28 -0400 Subject: [PATCH] 404 --- src/system/modules/nginx/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/system/modules/nginx/default.nix b/src/system/modules/nginx/default.nix index 35d88d1..6db9d51 100644 --- a/src/system/modules/nginx/default.nix +++ b/src/system/modules/nginx/default.nix @@ -35,13 +35,16 @@ in recommendedGzipSettings = true; eventsConfig = "worker_connections 4096;"; - # Catch-all default - reject unknown hosts instead of falling back + # Catch-all default - friendly error for unknown subdomains virtualHosts."_" = { default = true; useACMEHost = domain; forceSSL = true; locations."/" = { - return = "444"; # Close connection without response + return = "404 'Not Found: This subdomain does not exist.'"; + extraConfig = '' + add_header Content-Type text/plain; + ''; }; };