From 458f6c7f7b1df2a35dc7b78daf9dce5817aefcb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Sun, 16 May 2021 01:34:03 +0100 Subject: [PATCH] nginx: Avoid connection issues caused by IPv6 resolution If localhost is specified in the proxyPass url, nginx will happily resolve IPv6 addresses, even if the upstream doesn't support them. This can result in connection issues, especially with containers that don't support IPv6. --- configuration/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration/default.nix b/configuration/default.nix index f6ff072..72c955d 100644 --- a/configuration/default.nix +++ b/configuration/default.nix @@ -60,7 +60,7 @@ { forceSSL = true; enableACME = true; - locations."/" = { proxyPass = "http://localhost:${toString port}"; }; + locations."/" = { proxyPass = "http://127.0.0.1:${toString port}"; }; } // extra; in { "tlater.net" = host 3002 { serverAliases = [ "www.tlater.net" ]; };