@cryptotaxi247 / infra-1 / commits / 8e4bfa55

delft/eris: include Prometheus port in nginx proxy_pass directive

In NixOS 20.09, the listenAddress directive was changed to be purely for the address and not for the address:port combination as previously. This results in nginx now talking to *itself* using plaintext HTTP on 0.0.0.0. With forceSSL, this means nginx issues a redirect for the hostname -> the client gets a redirect to https://0.0.0.0/prometheus/.... Fixes #133

Luke Granger-Brown committed Nov 22, 2020 at 16:40 UTC 8e4bfa55d4cefb73594d6ad4d7ff44e17dabaab4
1 file changed +1 -1
delft/eris.nix
+1 -1
@@ -45,7 +45,7 @@ in {
45 forceSSL = true;
46 root = ./eris/status-page;
47 locations."/grafana/".proxyPass = "http://${config.services.grafana.addr}:${toString config.services.grafana.port}/";
48 - locations."/prometheus".proxyPass = "http://${config.services.prometheus.listenAddress}";
48 + locations."/prometheus".proxyPass = "http://${config.services.prometheus.listenAddress}:${toString config.service.prometheus.port}/";
49 };
50 };
51