1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat(nginx): add dummy host that matches unrecognized server_names

This commit is contained in:
oddlama 2023-07-02 12:14:52 +02:00
parent 01668ddee6
commit 73ab856da9
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A

View file

@ -71,6 +71,16 @@ in {
access_log syslog:server=unix:/dev/log,nohostname json_combined;
ssl_ecdh_curve secp384r1;
'';
# Default host that rejects everything.
# This is selected when no matching host is found for a request.
virtualHosts.dummy = {
listenAddresses = ["127.0.0.1" "[::1]"];
default = true;
locations."/".extraConfig = ''
deny all;
'';
};
};
networking.firewall.allowedTCPPorts = [80 443];