mirror of
https://github.com/deltathetawastaken/dotfiles.git
synced 2025-12-06 07:16:37 +03:00
grafana forward
This commit is contained in:
parent
de83d5de28
commit
59d1ae637a
|
|
@ -62,30 +62,28 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.grafanaforward_43 = {
|
services.nginx.enable = true;
|
||||||
enable = true;
|
services.nginx.virtualHosts."grafana_first" = {
|
||||||
description = "grafana forward";
|
forceSSL = false;
|
||||||
wantedBy = [ "multi-user.target" ];
|
listen = [{port = 2000; addr="0.0.0.0"; ssl=false;}];
|
||||||
serviceConfig = {
|
locations."/".extraConfig = ''
|
||||||
Restart = "on-failure";
|
proxy_set_header Host $host;
|
||||||
RestartSec = "15";
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
Type="simple";
|
proxy_pass http://123.123.123.123:3000;
|
||||||
DynamicUser=true;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
ExecStart="${pkgs.redir}/bin/redir -n :2000 123.123.123.123:3000";
|
proxy_set_header Connection "upgrade";
|
||||||
};
|
'';
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.grafanaforward_44 = {
|
|
||||||
enable = true;
|
|
||||||
description = "grafana forward";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = "15";
|
|
||||||
Type="simple";
|
|
||||||
DynamicUser=true;
|
|
||||||
ExecStart="${pkgs.redir}/bin/redir -n :2001 123.123.123.123:3000";
|
|
||||||
};
|
};
|
||||||
|
services.nginx.virtualHosts."grafana_second" = {
|
||||||
|
forceSSL = false;
|
||||||
|
listen = [{port = 2001; addr="0.0.0.0"; ssl=false;}];
|
||||||
|
locations."/".extraConfig = ''
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_pass http://123.123.123.123:3000;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "22.11";
|
system.stateVersion = "22.11";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue