fix caddy log config

This commit is contained in:
Charlotte 🦝 Delenk 2022-12-30 14:03:57 +01:00
parent 89af767ec5
commit 267e2f3182
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
17 changed files with 44 additions and 0 deletions

View file

@ -257,6 +257,7 @@ in {
sops.secrets."services/bunny-key".owner = "akkoma";
services.caddy.virtualHosts."akko.chir.rs" = {
useACMEHost = "chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
handle /media_attachments/* {

View file

@ -6,6 +6,28 @@ _: {
admin off
storage file_system /var/lib/caddy
auto_https disable_certs
log {
output file /var/log/caddy/access.log {
roll_keep_for 7d
}
format filter {
wrap json
fields {
request>remote_addr ip_mask {
ipv4 0
ipv6 0
}
request>headers>Cf-Connecting-Ip ip_mask {
ipv4 0
ipv6 0
}
request>headers>X-Forwarded-For ip_mask {
ipv4 0
ipv6 0
}
}
}
}
'';
extraConfig = ''
(baseConfig) {

View file

@ -11,6 +11,7 @@
};
services.caddy.virtualHosts."api.chir.rs" = {
useACMEHost = "chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
rewrite * /api.chir.rs/{path}

View file

@ -51,6 +51,7 @@ in {
];
services.caddy.virtualHosts."drone.int.chir.rs" = {
useACMEHost = "int.chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
reverse_proxy http://127.0.0.1:47927

View file

@ -65,6 +65,7 @@
services.caddy.virtualHosts."git.chir.rs" = {
useACMEHost = "chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig

View file

@ -23,6 +23,7 @@ in {
services.caddy.virtualHosts.${config.services.grafana.domain} = {
useACMEHost = "int.chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig

View file

@ -66,6 +66,7 @@ in {
};
services.caddy.virtualHosts."hydra.int.chir.rs" = {
useACMEHost = "int.chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig

View file

@ -178,6 +178,7 @@ in {
];
services.caddy.virtualHosts."matrix.chir.rs" = {
useACMEHost = "chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
handle /_matrix/media/* {

View file

@ -64,6 +64,7 @@
];
services.caddy.virtualHosts."moa.int.chir.rs" = {
useACMEHost = "int.chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
reverse_proxy http://localhost:5000 {

View file

@ -17,6 +17,7 @@ in {
};
services.caddy.virtualHosts."darkkirb.de" = {
useACMEHost = "darkkirb.de";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
@ -28,6 +29,7 @@ in {
};
services.caddy.virtualHosts."static.darkkirb.de" = {
useACMEHost = "darkkirb.de";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig

View file

@ -34,6 +34,7 @@
systemd.services.peertube.path = with pkgs; lib.mkForce [bashInteractive ffmpeg_5 nodejs-16_x openssl yarn python3 coreutils systemd];
services.caddy.virtualHosts."peertube.chir.rs" = {
useACMEHost = "chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
reverse_proxy {

View file

@ -37,6 +37,7 @@
];
services.caddy.virtualHosts."mail.chir.rs" = {
useACMEHost = "chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig

View file

@ -7,6 +7,7 @@
}: let
mkConfigExtra = extra: dest: {
useACMEHost = "chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
${extra}
@ -27,6 +28,7 @@ in {
"hydra.chir.rs" = mkConfig "https://hydra.int.chir.rs";
"mastodon.chir.rs" = {
useACMEHost = "chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
reverse_proxy {
@ -40,6 +42,7 @@ in {
};
"mastodon-assets.chir.rs" = {
useACMEHost = "chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
@getOnly {
@ -77,6 +80,7 @@ in {
};
"cache.chir.rs" = {
useACMEHost = "chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
@ -141,6 +145,7 @@ in {
"moa.chir.rs" = mkConfig "https://moa.int.chir.rs";
"chir.rs" = {
useACMEHost = "chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
handle /.well-known/webfinger {

View file

@ -182,6 +182,7 @@
};
caddy.virtualHosts."rspamd.int.chir.rs" = {
useACMEHost = "int.chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig

View file

@ -35,6 +35,7 @@
in {
services.caddy.virtualHosts."shitallover.me" = {
useACMEHost = "shitallover.me";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig

View file

@ -124,6 +124,7 @@
services.caddy.virtualHosts."matrix.int.chir.rs" = {
useACMEHost = "int.chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
@ -154,6 +155,7 @@
services.caddy.virtualHosts."matrix-admin.int.chir.rs" = {
useACMEHost = "int.chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig

View file

@ -30,6 +30,7 @@
];
services.caddy.virtualHosts."miifox.net" = {
useACMEHost = "miifox.net";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig