diff options
Diffstat (limited to 'hosts/cloud/bkk/nginx.nix')
-rw-r--r-- | hosts/cloud/bkk/nginx.nix | 25 |
1 files changed, 18 insertions, 7 deletions
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; # ''; # }; }; |