From c9424dd1a0a5bddba4b40b08c7afcf0f2f682e28 Mon Sep 17 00:00:00 2001 From: polwex Date: Tue, 10 Sep 2024 01:59:29 +0700 Subject: stalwart init --- hosts/cloud/bkk/nginx.nix | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'hosts/cloud/bkk/nginx.nix') diff --git a/hosts/cloud/bkk/nginx.nix b/hosts/cloud/bkk/nginx.nix index b70cb06..c73eaeb 100644 --- a/hosts/cloud/bkk/nginx.nix +++ b/hosts/cloud/bkk/nginx.nix @@ -1,10 +1,13 @@ -{ config, pkgs, ... }: { - +{ + config, + pkgs, + ... +}: { security.acme.acceptTerms = true; security.acme.defaults.email = "security@urbit.cam"; services.nginx = { enable = true; - virtualHosts."u.urbit.men" = { + virtualHosts."u.urbit.men" = { enableACME = true; forceSSL = true; locations."/" = { @@ -19,10 +22,18 @@ chunked_transfer_encoding off; proxy_http_version 1.1; proxy_buffering off; - proxy_cache off; + proxy_cache off; ''; }; - virtualHosts."n.urbit.men" = { + virtualHosts."m.urbit.men" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:8080"; + proxyWebsockets = true; # needed if you need to use WebSocket + }; + }; + virtualHosts."n.urbit.men" = { enableACME = true; forceSSL = true; locations."/" = { @@ -37,7 +48,7 @@ chunked_transfer_encoding off; proxy_http_version 1.1; proxy_buffering off; - proxy_cache off; + proxy_cache off; ''; }; # virtualHosts."t.urbit.men" = { @@ -55,7 +66,7 @@ # chunked_transfer_encoding off; # proxy_http_version 1.1; # proxy_buffering off; - # proxy_cache off; + # proxy_cache off; # ''; # }; }; -- cgit v1.2.3