From cb65f94dded5d1ebe0e264cf2982ffc90feb8b55 Mon Sep 17 00:00:00 2001 From: Henri Bourcereau Date: Sat, 9 May 2026 18:06:31 +0200 Subject: [PATCH] fix(nix): nginx vhost explicit listen --- module.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/module.nix b/module.nix index 61800dd..2577d13 100644 --- a/module.nix +++ b/module.nix @@ -123,6 +123,15 @@ in "${cfg.hostname}" = { enableACME = withSSL; forceSSL = withSSL; + # Explicit listen so this vhost isn't shadowed by a default_server + # created by other virtual hosts with forceSSL = true. + listen = if withSSL then [ + { addr = "0.0.0.0"; port = 443; ssl = true; } + { addr = "[::]"; port = 443; ssl = true; } + ] else [ + { addr = "0.0.0.0"; port = 80; ssl = false; } + { addr = "[::]"; port = 80; ssl = false; } + ]; locations."/" = { extraConfig = proxyConfig; proxyPass = "http://trictrac-api/";