Replace metrics with advanced metrics for path-based counters
Alan Pearce alan@alanpearce.eu
Fri, 07 Jul 2023 20:14:56 +0200
2 files changed, 7 insertions(+), 6 deletions(-)
jump to
M Caddyfile → Caddyfile
@@ -4,15 +4,12 @@ persist_config off auto_https disable_redirects acme_ca https://acme.zerossl.com/v2/DV90 import globals/* + order advanced_metrics before file_server + order advanced_metrics before reverse_proxy servers :80 { - metrics protocols h1 h2c trusted_proxies static private_ranges } -} - -:9091 { - metrics } http://, @@ -24,6 +21,9 @@ redir https://alanpearce.eu{uri} permanent } http://alanpearce.eu { + advanced_metrics { + port 9091 + } root * {$SITE_ROOT} file_server { precompressed br zstd gzip
M Dockerfile → Dockerfile
@@ -4,7 +4,8 @@ FROM docker.io/caddy:${VERSION}-builder-${VARIANT} AS builder RUN xcaddy build \ - --with github.com/gamalan/caddy-tlsredis + --with github.com/gamalan/caddy-tlsredis \ + --with github.com/sebastianbrunnert/caddy-advanced-metrics FROM docker.io/caddy:${VERSION}-${VARIANT}