From cb1e6cfa4f7b30a6491ead84a8dbe8b4d43431e0 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sat, 11 Nov 2023 10:30:20 +0530 Subject: kay/www/fscusat: init --- hosts/kay/modules/www.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'hosts/kay/modules/www.nix') diff --git a/hosts/kay/modules/www.nix b/hosts/kay/modules/www.nix index 08548e8..521bd6e 100644 --- a/hosts/kay/modules/www.nix +++ b/hosts/kay/modules/www.nix @@ -3,6 +3,7 @@ let domain = config.userdata.domain; email = config.userdata.email; + fscusat = "fscusat.org"; in { imports = [ @@ -42,6 +43,24 @@ in enableACME = true; root = "/var/www/${domain}"; }; + "${fscusat}" = { + forceSSL = true; + enableACME = true; + globalRedirect = "www.${fscusat}"; + }; + "www.${fscusat}" = { + forceSSL = true; + enableACME = true; + extraConfig = '' + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_read_timeout 600; + ''; + + locations."/" = { + proxyPass = "http://10.0.1.4:80"; + }; + }; }; }; } -- cgit v1.2.3