summaryrefslogtreecommitdiff
path: root/hosts/cloud/bkk/nginx.nix
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2024-07-21 01:09:48 +0700
committerpolwex <polwex@sortug.com>2024-07-21 01:09:48 +0700
commit78907aa98c1af8624a62ca123d088c6c16424f41 (patch)
tree477fe923810522acc211b7514e4931af80f33ed7 /hosts/cloud/bkk/nginx.nix
init
Diffstat (limited to 'hosts/cloud/bkk/nginx.nix')
-rw-r--r--hosts/cloud/bkk/nginx.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/hosts/cloud/bkk/nginx.nix b/hosts/cloud/bkk/nginx.nix
new file mode 100644
index 0000000..f948e0e
--- /dev/null
+++ b/hosts/cloud/bkk/nginx.nix
@@ -0,0 +1,62 @@
+{ config, pkgs, ... }: {
+
+ security.acme.acceptTerms = true;
+ security.acme.defaults.email = "security@urbit.cam";
+ services.nginx = {
+ enable = true;
+ virtualHosts."u.urbit.men" = {
+ enableACME = true;
+ forceSSL = true;
+ locations."/" = {
+ proxyPass = "http://127.0.0.1:8080";
+ # proxyWebsockets = true; # needed if you need to use WebSocket
+ extraConfig = ''
+ proxy_set_header Host $host;
+ proxy_set_header Forwarded $proxy_add_x_forwarded_for;
+ '';
+ };
+ extraConfig = ''
+ chunked_transfer_encoding off;
+ proxy_http_version 1.1;
+ proxy_buffering off;
+ proxy_cache off;
+ '';
+ };
+ virtualHosts."n.urbit.men" = {
+ enableACME = true;
+ forceSSL = true;
+ locations."/" = {
+ proxyPass = "http://127.0.0.1:8090";
+ # proxyWebsockets = true; # needed if you need to use WebSocket
+ extraConfig = ''
+ proxy_set_header Host $host;
+ proxy_set_header Forwarded $proxy_add_x_forwarded_for;
+ '';
+ };
+ extraConfig = ''
+ chunked_transfer_encoding off;
+ proxy_http_version 1.1;
+ proxy_buffering off;
+ proxy_cache off;
+ '';
+ };
+ # virtualHosts."t.urbit.men" = {
+ # enableACME = true;
+ # forceSSL = true;
+ # locations."/" = {
+ # proxyPass = "http://127.0.0.1:8081";
+ # # proxyWebsockets = true; # needed if you need to use WebSocket
+ # extraConfig = ''
+ # proxy_set_header Host $host;
+ # proxy_set_header Forwarded $proxy_add_x_forwarded_for;
+ # '';
+ # };
+ # extraConfig = ''
+ # chunked_transfer_encoding off;
+ # proxy_http_version 1.1;
+ # proxy_buffering off;
+ # proxy_cache off;
+ # '';
+ # };
+ };
+}