From 78907aa98c1af8624a62ca123d088c6c16424f41 Mon Sep 17 00:00:00 2001 From: polwex Date: Sun, 21 Jul 2024 01:09:48 +0700 Subject: init --- hosts/cloud/oldsortug/nginx.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 hosts/cloud/oldsortug/nginx.nix (limited to 'hosts/cloud/oldsortug/nginx.nix') diff --git a/hosts/cloud/oldsortug/nginx.nix b/hosts/cloud/oldsortug/nginx.nix new file mode 100644 index 0000000..ba64539 --- /dev/null +++ b/hosts/cloud/oldsortug/nginx.nix @@ -0,0 +1,21 @@ +{ ... }: { + + security.acme.acceptTerms = true; + security.acme.defaults.email = "security@sortug.com"; + users.users.y.homeMode = "750"; + services.nginx = { + enable = true; + virtualHosts."old.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; + ''; + # actually important + }; + }; + }; +} -- cgit v1.2.3