Map WP Multisite blog.example.com to anotherdomain.com/blog?

You can set up Caddy to reverse proxy requests to the Multisite installation:

In your Caddyfile, add a reverse_proxy directive for the Multisite:

somedomain.com/blog {
    reverse_proxy blog.example.com
}

This will forward all requests to somedomain.com/blog to the Multisite installation at blog.example.com.

Next, update the WordPress Multisite configuration to use the new domain:

In your WordPress database, go to the wp_blogs table and locate the row for your main site (usually with blog_id of 1).

Change the domain and path values to somedomain.com and /blog, respectively.

Also update the siteurl and home values in the wp_options table to https://somedomain.com/blog.

steps required depending on your specific setup, such as updating permalinks, changing any hard-coded links in your content, and configuring SSL certificates.