Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
34570c554b
|
|||
|
cd54eabe47
|
|||
|
d8d2ed1a8f
|
@@ -62,8 +62,10 @@ in
|
||||
name = "loki";
|
||||
match = "*";
|
||||
|
||||
host = "ildkule.pvv.ntnu.no";
|
||||
port = 3100;
|
||||
host = "loki.pvv.ntnu.no";
|
||||
port = 443;
|
||||
tls = "on";
|
||||
"tls.verify" = "on";
|
||||
uri = "/loki/api/v1/push";
|
||||
compress = "gzip";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, values, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.loki;
|
||||
@@ -9,8 +9,8 @@ in {
|
||||
configuration = {
|
||||
auth_enabled = false;
|
||||
server = {
|
||||
http_listen_port = 3100;
|
||||
http_listen_address = "0.0.0.0";
|
||||
http_listen_port = 31832;
|
||||
http_listen_address = "127.0.0.1";
|
||||
grpc_listen_port = 9096;
|
||||
};
|
||||
|
||||
@@ -81,5 +81,25 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ cfg.configuration.server.http_listen_port ];
|
||||
services.nginx.virtualHosts."loki.pvv.ntnu.no" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
kTLS = true;
|
||||
|
||||
locations = {
|
||||
"/".return = "403";
|
||||
"/loki/api/v1/push" = {
|
||||
proxyPass = "http://${cfg.configuration.server.http_listen_address}:${toString cfg.configuration.server.http_listen_port}/loki/api/v1/push";
|
||||
extraConfig = ''
|
||||
allow 127.0.0.1;
|
||||
allow ::1;
|
||||
allow ${values.ipv4-space};
|
||||
allow ${values.ipv6-space};
|
||||
allow ${values.ntnu.ipv4-space};
|
||||
allow ${values.ntnu.ipv6-space};
|
||||
deny all;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user