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