1. The problem I’m having:
After upgraded from 2.6.2 to 2.9.1 my Caddy file in no longer working around the 2 plugins:
rate_limit and maxmind_geolocation
for rate_limit:
2. Error messages and/or full log output:
Error: adapting config using caddyfile: /etc/caddy/Caddyfile:11: unrecognized directive: rate_limit
Error: adapting config using caddyfile: getting matcher module 'maxmind_geolocation': module not registered: http.matchers.maxmind_geolocation
3. Caddy version:
v2.9.1 h1:OEYiZ7DbCzAWVb6TNEkjRcSCRGHVoZsJinoDR/n9oaY=
4. How I installed and ran Caddy:
a. System environment:
Ubuntu 22.04.5 LTS
b. Command:
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
xcaddy build --with github.com/porech/caddy-maxmind-geolocation
xcaddy build --with github.com/mholt/caddy-ratelimit
Before, I’m just update the system “sudo apt update” …
withe the same outcome
d. My complete Caddy config:
crios.bris.fr:777 {
# rate limit for all client (static_limit) and each client (dynamic_limit)
rate_limit {
distributed
zone static_limit {
key static
events 100
window 10s
}
zone dynamic_limit {
key {remote_host}
events 400
window 1m
}
}
reverse_proxy 192.168.9.201:5000
}