ma euer.mon.krebsco.de: proxy to wbob

This commit is contained in:
makefu 2018-09-17 00:42:16 +02:00
parent b54f309eb9
commit 9adb8c9825
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -10,7 +10,12 @@ let
in { in {
services.nginx = { services.nginx = {
enable = mkDefault true; enable = mkDefault true;
virtualHosts."mon.euer.krebsco.de" = { virtualHosts."mon.euer.krebsco.de" = let
# flesh_wrap
authFile = pkgs.writeText "influx.conf" ''
user:$apr1$ZG9oQCum$FhtIe/cl3jf8Sa4zq/BWd1
'';
in {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
@ -21,6 +26,17 @@ in {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
''; '';
}; };
locations."/influxdb/" = {
proxyPass = "http://wbob.r:8086/";
extraConfig = ''
auth_basic "Needs Autherization to visit";
auth_basic_user_file ${authFile};
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
'';
};
}; };
}; };
} }