add 404 host

This commit is contained in:
Satria 2026-03-01 10:29:10 +07:00
commit cda94f0850

View file

@ -22,7 +22,12 @@ in {
enable = true; enable = true;
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedTlsSettings = true; recommendedTlsSettings = true;
virtualHosts = lib.mapAttrs' (subdomain: cfg: lib.nameValuePair "${subdomain}.${base}" { virtualHosts = {
"_" = {
default = true;
locations."/".return = "404";
};
} // lib.mapAttrs' (subdomain: cfg: lib.nameValuePair (if subdomain == "@" then base else "${subdomain}.${base}") {
useACMEHost = base; useACMEHost = base;
forceSSL = true; forceSSL = true;