freifunk: shorten services.nginx.virtualHosts
This commit is contained in:
parent
6f16c99c38
commit
d2f65be2e4
|
@ -226,7 +226,15 @@ in {
|
|||
"c3d2.ffdd" = {
|
||||
default = true;
|
||||
root = <this-host/assets>;
|
||||
locations = {
|
||||
locations =
|
||||
let
|
||||
sysinfo-json = {
|
||||
alias = "/tmp/sysinfo.json";
|
||||
extraConfig = ''
|
||||
add_header Content-Type "application/json;charset=UTF-8";
|
||||
'';
|
||||
};
|
||||
in {
|
||||
"/" = {
|
||||
index = "index.html";
|
||||
extraConfig = ''
|
||||
|
@ -234,40 +242,18 @@ in {
|
|||
add_header etag "\"${builtins.substring 11 32 (<this-host> + "/assets")}\"";
|
||||
'';
|
||||
};
|
||||
"=/sysinfo-json.cgi" = {
|
||||
alias = "/tmp/sysinfo.json";
|
||||
extraConfig = ''
|
||||
add_header Content-Type "application/json;charset=UTF-8";
|
||||
'';
|
||||
};
|
||||
"=/sysinfo.json" = {
|
||||
alias = "/tmp/sysinfo.json";
|
||||
extraConfig = ''
|
||||
add_header Content-Type "application/json;charset=UTF-8";
|
||||
'';
|
||||
"=/sysinfo-json.cgi" = sysinfo-json;
|
||||
"=/sysinfo.json" = sysinfo-json;
|
||||
};
|
||||
};
|
||||
};
|
||||
"storage.hq.c3d2.ffdd" = {
|
||||
locations = {
|
||||
"/".proxyPass = "http://storage.hq.c3d2.de/";
|
||||
};
|
||||
};
|
||||
"grafana.hq.c3d2.ffdd" = {
|
||||
locations = {
|
||||
"/" = {
|
||||
"storage.hq.c3d2.ffdd".locations."/".proxyPass = "http://storage.hq.c3d2.de/";
|
||||
"grafana.hq.c3d2.ffdd".locations."/" = {
|
||||
proxyPass = "https://grafana.hq.c3d2.de/";
|
||||
extraConfig = ''
|
||||
proxy_ssl_server_name on;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
"influxdb.hq.c3d2.ffdd" = {
|
||||
locations = {
|
||||
"/".proxyPass = "http://grafana.hq.c3d2.de:8086/";
|
||||
};
|
||||
};
|
||||
"influxdb.hq.c3d2.ffdd".locations."/".proxyPass = "http://grafana.hq.c3d2.de:8086/";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue