send nginx log to journal
Some checks failed
Test Nix flake / Test nix flake (push) Has been cancelled
Some checks failed
Test Nix flake / Test nix flake (push) Has been cancelled
This commit is contained in:
parent
14fe8e912e
commit
6022b14de8
1 changed files with 46 additions and 26 deletions
|
|
@ -66,34 +66,27 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
nginx.virtualHosts."monitoring.${config.networking.domain}" = {
|
||||
nginx.virtualHosts.${fqdn} = {
|
||||
default = true;
|
||||
quic = true;
|
||||
kTLS = true;
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
#extraConfig = ''
|
||||
# map $http_upgrade $connection_upgrade {
|
||||
# default upgrade;
|
||||
# \'\' close;
|
||||
# }
|
||||
#'';
|
||||
extraConfig = ''
|
||||
proxy_set_header Forwarded "$proxy_forwarded_for_element;$proxy_forwarded_by_element;host=$host;proto=$scheme";
|
||||
error_log syslog:server=unix:/dev/log,tag=${builtins.replaceStrings [ "." ] [ "_" ] fqdn} warn;
|
||||
access_log syslog:server=unix:/dev/log vhost_combined;
|
||||
'';
|
||||
locations = {
|
||||
"/" = {
|
||||
basicAuthFile = config.age.secrets.grafana_basic_auth.path;
|
||||
proxyPass = "http://unix:/run/grafana/grafana.sock";
|
||||
recommendedProxySettings = true;
|
||||
extraConfig = ''
|
||||
proxy_set_header Forwarded "$proxy_forwarded_for_element;$proxy_forwarded_by_element;host=$host;proto=$scheme";
|
||||
'';
|
||||
};
|
||||
"/api/live/" = {
|
||||
proxyPass = "http://unix:/run/grafana/grafana.sock";
|
||||
recommendedProxySettings = true;
|
||||
proxyWebsockets = true;
|
||||
extraConfig = ''
|
||||
proxy_set_header Forwarded "$proxy_forwarded_for_element;$proxy_forwarded_by_element;host=$host;proto=$scheme";
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue