This article describes what you’re encountering:
Have you ever tried to reverse proxy an app into its own little subfolder of your domain name?
Makes things neat, doesn’t it? Using example.com/foo/ for one app, example.com/bar/ for another. If you’re coming here from one of the selfhosted communities, you might be thinking along the lines of example.com/sonarr/, example.com/radarr/ etc.
Chances are, you’ve tried some configuration along these lines:
example.com {
redir /sonarr /sonarr/
handle_path /sonarr/* {
reverse_proxy localhost…
Also FYI, you can replace that config with the following (handle_path does the stripping of the path prefix for you, and the * on reverse_proxy is unnecessary):
handle_path /hikvision/* {
reverse_proxy http://10.10.x.x:80 {
import header_options
}
}