mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-23 16:29: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;
|
||||
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;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue