From 77c06c5509a05cfa60e47b1d7c02ecd7dc26330f Mon Sep 17 00:00:00 2001 From: schweby Date: Thu, 18 Mar 2021 19:04:00 +0100 Subject: [PATCH] hainich/nginx: let all empty subdomains 404 * make hainich.hacc.space the default virtualHost for nginx if no host is running on that subdomain, this will be shown * disable SSL, so no pesky SSL error for empty subdomains anymore * remove lots of unneeded brackes and semicolons --- hosts/hainich/services/nginx.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hosts/hainich/services/nginx.nix b/hosts/hainich/services/nginx.nix index 9a2f162..4dc2f53 100644 --- a/hosts/hainich/services/nginx.nix +++ b/hosts/hainich/services/nginx.nix @@ -12,14 +12,10 @@ services.nginx.virtualHosts = let in { + # let all empty subdomains pointing to hainich return 404 "hainich.hacc.space" = { - enableACME = true; - forceSSL = true; - locations = { - "/" = { - return = "404"; - }; - }; + default = true; + locations."/".return = "404"; }; };