summaryrefslogtreecommitdiff
path: root/hosts/kay
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2023-11-11 10:30:20 +0530
committersinanmohd <sinan@sinanmohd.com>2023-11-11 10:30:20 +0530
commitcb1e6cfa4f7b30a6491ead84a8dbe8b4d43431e0 (patch)
treecb77ab3c8dfa0b163b02f99749f7ac53102fbd29 /hosts/kay
parent493c355153cb690d87d99303e4a550bf16e8d747 (diff)
kay/www/fscusat: init
Diffstat (limited to 'hosts/kay')
-rw-r--r--hosts/kay/modules/www.nix19
1 files changed, 19 insertions, 0 deletions
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";
+ };
+ };
};
};
}