mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 08:39:42 -04:00
404
This commit is contained in:
parent
2f34d995df
commit
05ed364b26
1 changed files with 5 additions and 2 deletions
|
|
@ -35,13 +35,16 @@ in
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
eventsConfig = "worker_connections 4096;";
|
eventsConfig = "worker_connections 4096;";
|
||||||
|
|
||||||
# Catch-all default - reject unknown hosts instead of falling back
|
# Catch-all default - friendly error for unknown subdomains
|
||||||
virtualHosts."_" = {
|
virtualHosts."_" = {
|
||||||
default = true;
|
default = true;
|
||||||
useACMEHost = domain;
|
useACMEHost = domain;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
return = "444"; # Close connection without response
|
return = "404 'Not Found: This subdomain does not exist.'";
|
||||||
|
extraConfig = ''
|
||||||
|
add_header Content-Type text/plain;
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue