From 0626281cc7484c4d21ffd3e0bbe649dedf221af1 Mon Sep 17 00:00:00 2001 From: Johannes Hendrik Gerard van der Weide Date: Thu, 7 Mar 2024 12:13:27 +0100 Subject: [PATCH] Nginx isn't the problem I will leave it as is --- services/iceshrimp.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/services/iceshrimp.nix b/services/iceshrimp.nix index 6d6180e..9c35865 100644 --- a/services/iceshrimp.nix +++ b/services/iceshrimp.nix @@ -5,7 +5,7 @@ iceshrimp = { enable = true; # Actually enable the module createDb = true; - configureNginx.enable = true; + configureNginx.enable = false; stateDir = "/var/lib/iceshrimp"; mediaDir = "/var/lib/iceshrimp/files"; settings = { @@ -14,5 +14,20 @@ maxCaptionLength = 5000; # We did it HermitCollective!! We solved accesibility! }; }; + + nginx.virtualHosts."mastodon.hermitcollective.net" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:3000"; + proxyWebsockets = true; # needed if you need to use WebSocket + extraConfig = + # required when the target is also TLS server with multiple hosts + "proxy_ssl_server_name on;" + + # required when the server wants to use HTTP Authentication + "proxy_pass_header Authorization;" + ; + }; + }; }; }