diff options
Diffstat (limited to '')
-rw-r--r-- | profiles/nginx.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/profiles/nginx.nix b/profiles/nginx.nix index 766739b..7446cbc 100644 --- a/profiles/nginx.nix +++ b/profiles/nginx.nix @@ -2,7 +2,13 @@ { services.nginx = { enable = true; - statusPage = true; # For monitoring scraping. + + # For monitoring scraping. If we don't set a default port, it will + # by default use port 80, which will conflict with the + # configuration of the router, since we need to listen on port 80 + # too for streaming. + statusPage = true; + defaultHTTPListenPort = 8080; recommendedGzipSettings = true; recommendedOptimisation = true; @@ -12,6 +18,7 @@ services.prometheus.exporters.nginx = { enable = true; + scrapeUri = "http://127.0.0.1:${toString config.services.nginx.defaultHTTPListenPort}/nginx_status"; listenAddress = "127.0.0.1"; port = 9113; }; |