Error when accessing via reverse proxy

I have Caddy 2 setup and working (I think) on a separate server. I want to use it for reverse proxies to my Jellyfin server and my Home Assistant server using different subdirectories. I don’t think my Caddy config is the issue because it’s working fine for Jellyfin but here is my Caddyfile:

 mydomain.com {

        handle_path /ha* {
                reverse_proxy 192.168.0.12:8123
        }

        handle_path /jf* {
                reverse_proxy 192.168.0.10:8096
        }
}

When I try to access mydomain.com/ha I’m only shown the Home Assistant logo and it doesn’t go any further:
image

The logs show the following error related to this and I’m clueless as to what the actual problem here is:

Logger: aiohttp.server
Source: /usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py:405
First occurred: 01:59:46 (10 occurrences)
Last logged: 20:33:28

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.InvalidURLError: 400, message='Unexpected char in url schema'

Seems to be an issue with the URL but I’m really not sure of the specific problem or how to fix it

You can’t do that. HA doesn’t support the use of paths like that.

Thanks, that explains it. I’ll leave the subdirectories plan and just use different ports instead.