summaryrefslogtreecommitdiff
path: root/hosts/cloud/hetzner/nginx.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/cloud/hetzner/nginx.nix')
-rw-r--r--hosts/cloud/hetzner/nginx.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/hosts/cloud/hetzner/nginx.nix b/hosts/cloud/hetzner/nginx.nix
new file mode 100644
index 0000000..4a6d708
--- /dev/null
+++ b/hosts/cloud/hetzner/nginx.nix
@@ -0,0 +1,29 @@
+{
+ config,
+ pkgs,
+ ...
+}: {
+ security.acme.acceptTerms = true;
+ security.acme.defaults.email = "security@urbit.cam";
+ services.nginx = {
+ enable = true;
+ virtualHosts."u.urbit.cloud" = {
+ 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;
+ '';
+ };
+ };
+}