mirror of
https://git.lgmrszd.xyz/Lgmrszd/nix-cfg.git
synced 2024-11-25 04:28:01 +01:00
handling of unknown subdomains
This commit is contained in:
parent
fba9f555d3
commit
4af5fb4bcb
1 changed files with 10 additions and 4 deletions
|
@ -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";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue