summaryrefslogtreecommitdiff
path: root/nixos/hosts/tente/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/hosts/tente/default.nix')
-rw-r--r--nixos/hosts/tente/default.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix
index 5d1bce9..c2b6491 100644
--- a/nixos/hosts/tente/default.nix
+++ b/nixos/hosts/tente/default.nix
@@ -100,6 +100,19 @@ in
nginx = {
enable = true;
group = "www-data";
+
+ appendHttpConfig = ''
+ # Close the connection for unknown Host headers.
+ # If we don't do this nginx serves some random virtualhost.
+ server {
+ listen 80 default_server;
+ listen [::]:80 default_server;
+ listen 443 ssl default_server;
+ listen [::]:443 ssl default_server;
+ ssl_reject_handshake on;
+ return 444;
+ }
+ '';
};
};