handling of unknown subdomains

This commit is contained in:
Lgmrszd 2024-01-16 22:30:42 +03:00
parent fba9f555d3
commit 4af5fb4bcb
No known key found for this signature in database
GPG key ID: 9396B8BA6FBB14DE

View file

@ -2,7 +2,7 @@
let let
rootDomain = "lgmrszd.xyz"; rootDomain = "lgmrszd.xyz";
gtnhDomain = "gtnh.${rootDomain}"; gtnhDomain = "gtnh.${rootDomain}";
discDomain = "discource.testdrive.${rootDomain}"; discDomain = "discourse.testdrive.${rootDomain}";
akkoDomain = "akko.testdrive.${rootDomain}"; akkoDomain = "akko.testdrive.${rootDomain}";
iceDomain = "ice.testdrive.${rootDomain}"; iceDomain = "ice.testdrive.${rootDomain}";
in in
@ -39,10 +39,16 @@ in
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts.${rootDomain} = { virtualHosts."${rootDomain}80" = {
# addSSL = true; serverName = rootDomain;
forceSSL = true; rejectSSL = true;
default = true; default = true;
locations."/" = {
return = "301 https://${rootDomain}$request_uri";
};
};
virtualHosts.${rootDomain} = {
onlySSL = true;
enableACME = true; enableACME = true;
root = "/var/www/todo"; root = "/var/www/todo";
}; };