From 1bb84e508854a94f1fcaadb207f5fca89b250d98 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Mon, 30 Nov 2026 09:21:12 +0000 Subject: [PATCH] ops: JSON access log for every Caddy site (feeds threatcrushd) The homepage-symlink breach left no record of which files were fetched, because no site logged requests. Every site now imports one shared, rolled JSON log at /var/log/caddy/access.log, which threatcrushd's log-watcher tails for scanners, brute force and path probing. Co-Authored-By: Claude Opus 5.5 --- setup.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/setup.sh b/setup.sh index 58355aa..bd1f9a5 100755 --- a/setup.sh +++ b/setup.sh @@ -847,6 +847,7 @@ if [ "$FORGEJO" = "1" ]; then GIT_SITE=" ${GIT_DOMAIN} { encode zstd gzip + import accesslog reverse_proxy http://${FORGEJO_HTTP_ADDR} } " @@ -865,6 +866,7 @@ news.${DOMAIN} { on_demand } encode zstd gzip + import accesslog header Content-Type \"text/plain; charset=utf-8\" respond \"AgentBBS Usenet (members-only). Point a newsreader at news.${DOMAIN}:563 over NNTPS and AUTHINFO USER (any password). Or from the BBS: ssh -t news@${DOMAIN}\" } @@ -880,6 +882,7 @@ if [ "$IRC" = "1" ]; then IRC_SITE=" ${IRC_DOMAIN} { encode zstd gzip + import accesslog handle /irc { reverse_proxy 127.0.0.1:8097 } @@ -900,6 +903,7 @@ if [ "$MAIL_STACK" = "1" ]; then MAIL_SITE=" ${MAIL_DOMAIN} { encode zstd gzip + import accesslog reverse_proxy 127.0.0.1:8080 } " @@ -912,6 +916,7 @@ fi FILES_SITE=" ${FILES_DOMAIN} { encode zstd gzip + import accesslog # A pure file server (NOT a website host — member homepages live on the BBS # at https://${DOMAIN}/~). The agentbbs file-manager on loopback serves: @@ -939,6 +944,7 @@ if [ "$CHAT" = "1" ]; then CHAT_SITE=" ${CHAT_DOMAIN} { encode zstd gzip + import accesslog reverse_proxy ${CHAT_ADDR} } " @@ -956,8 +962,24 @@ cat > /etc/caddy/Caddyfile <