Radicale reverse proxy (Caddy 2.0)

Oh, I see.

https://radicale.org/3.0.html#tutorials/reverse-proxy

Their docs say:

The proxy must remove the location from the URL path that is forwarded to Radicale.

That’s something that Nginx does implicitly, but in Caddy you need to do explicitly.

:80 {
	handle /radicale* {
		uri strip_prefix /radicale
		reverse_proxy localhost:5232 {
			header_up X-Script-Name /radicale
		}
	}
}

FYI in Caddy v2.1 (first beta is about to release today), this can be shortened to:

:80 {
	handle_path /radicale* {
		reverse_proxy localhost:5232 {
			header_up X-Script-Name /radicale
		}
	}
}