Trying to use Caddy for Mastodon - Having trouble translating Caddyfile from v1 to v2

FYI all of these are using exact paths, I think you probably meant to append a * at the end of each path (or for the first one, i.e. /, just omit the / entirely).

The closest equivalent of this to v2 is something like this:

handle_errors {
    root * /data/mastodon/public
    rewrite 500.html
    file_server
}

Might not work exactly the same way but it should at least serve 500.html if there’s any 4xx or 5xx error.

1 Like