Can't get Caddy v2 to work on Home Assistant as reverse proxy

First thing I notice is that you strip the path, then match on that same path. So if the path is stripped, that path will no longer be there to match on. So you’d need to remove the matcher on reverse_proxy here.

But all these route + uri strip_prefix can be replaced by handle_path, like this:

handle_path /qnap/* {
	reverse_proxy 10.0.0.10:8088
}

You didn’t specify https:// for the proxy here, and you’re using a port that’s not 443, so Caddy won’t be trying to use TLS anyways. So if you need to use tls, do specify https:// on the upstream address. Otherwise, you can remove the transport stuff, and move your upstream address inline instead of in a block.

All that said, I generally recommend using subdomains when you have many services to serve, rather than subpaths. Read this post to understand why:

1 Like