From e179300899ea74865cd35fb38f7d589dcd269ecb Mon Sep 17 00:00:00 2001 From: polwex Date: Thu, 12 Sep 2024 03:13:47 +0700 Subject: m --- hosts/cloud/sortug/nginx.nix | 47 +++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 20 deletions(-) (limited to 'hosts/cloud/sortug/nginx.nix') diff --git a/hosts/cloud/sortug/nginx.nix b/hosts/cloud/sortug/nginx.nix index a3e5a85..655b44c 100644 --- a/hosts/cloud/sortug/nginx.nix +++ b/hosts/cloud/sortug/nginx.nix @@ -1,22 +1,21 @@ -{ ... }: { - +{...}: { security.acme.acceptTerms = true; security.acme.defaults.email = "security@sortug.com"; services.nginx = { enable = true; - virtualHosts."sortug.com" = { + virtualHosts."sortug.com" = { enableACME = true; forceSSL = true; root = "/var/www/sortug"; # root = "/home/y/www"; }; - virtualHosts."cal.sortug.com" = { + virtualHosts."cal.sortug.com" = { enableACME = true; forceSSL = true; root = "/var/www/sorcal"; # root = "/home/y/www"; }; - virtualHosts."git.sortug.com" = { + virtualHosts."git.sortug.com" = { enableACME = true; forceSSL = true; locations."/" = { @@ -24,7 +23,15 @@ proxyWebsockets = true; # needed if you need to use WebSocket }; }; - virtualHosts."u.sortug.com" = { + virtualHosts."ai.sortug.com" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:8000"; + proxyWebsockets = true; # needed if you need to use WebSocket + }; + }; + virtualHosts."u.sortug.com" = { enableACME = true; forceSSL = true; locations."/" = { @@ -32,7 +39,7 @@ proxyWebsockets = true; # needed if you need to use WebSocket }; }; - virtualHosts."p.sortug.com" = { + virtualHosts."p.sortug.com" = { enableACME = true; forceSSL = true; locations."/" = { @@ -47,10 +54,10 @@ proxy_http_version 1.1; chunked_transfer_encoding off; proxy_buffering off; - proxy_cache off; + proxy_cache off; ''; }; - virtualHosts."ntfy.sortug.com" = { + virtualHosts."ntfy.sortug.com" = { enableACME = true; forceSSL = true; locations."/" = { @@ -65,10 +72,10 @@ proxy_http_version 1.1; chunked_transfer_encoding off; proxy_buffering off; - proxy_cache off; + proxy_cache off; ''; }; - virtualHosts."ustj.sortug.com" = { + virtualHosts."ustj.sortug.com" = { enableACME = true; forceSSL = true; locations."/" = { @@ -83,36 +90,36 @@ proxy_http_version 1.1; chunked_transfer_encoding off; proxy_buffering off; - proxy_cache off; + proxy_cache off; ''; }; - virtualHosts."s3.sortug.com" = { + virtualHosts."s3.sortug.com" = { enableACME = true; forceSSL = true; locations."/" = { proxyPass = "http://127.0.0.1:9000"; proxyWebsockets = true; # needed if you need to use WebSocket extraConfig = '' - proxy_set_header Host $Host; + proxy_set_header Host $Host; ''; # actually important }; }; - virtualHosts."s3c.sortug.com" = { + virtualHosts."s3c.sortug.com" = { enableACME = true; forceSSL = true; locations."/" = { proxyPass = "http://127.0.0.1:9001"; proxyWebsockets = true; # needed if you need to use WebSocket extraConfig = '' - proxy_set_header Host $Host; + proxy_set_header Host $Host; ''; }; }; - # proxy_http_version 1.1; - # proxy_set_header Upgrade $http_upgrade; - # proxy_set_header Connection "Upgrade"; - virtualHosts."urbit.s3.sortug.com" = { + # proxy_http_version 1.1; + # proxy_set_header Upgrade $http_upgrade; + # proxy_set_header Connection "Upgrade"; + virtualHosts."urbit.s3.sortug.com" = { enableACME = true; forceSSL = true; locations."/" = { -- cgit v1.2.3