config/profiles/http/services/ntopng.nix

25 lines
773 B
Nix
Raw Permalink Normal View History

2023-02-25 00:03:29 +01:00
{ config, pkgs, lib, mkDomain, ... }:
{
# ntopng
# High-speed web-based traffic analysis and flow collection tool
# WARNING: default username and password is admin:admin
services.ntopng = {
enable = true; # also enables redis for persistent data storage
httpPort = 3987; # HTTP port of embedded web server
#interfaces = [ "any" ];
#extraConfig = ";
#redis.address = "";
#redis.createInstance = "ntopng";
};
services.nginx.virtualHosts.${mkDomain "ntopng"} = lib.mkIf config.services.ntopng.enable {
forceSSL = true; # addSSL = true;
enableACME = true; #useACMEHost = acmeDomain;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.ntopng.httpPort}";
proxyWebsockets = true;
};
};
}