Whatever i do i’m getting to the root of the tomcat server & not the application. If I append the /ViewPower/ it works e.g. https://ups.foo.net/ViewPower/
You were close with the last one, but you need to add {uri} to preserve the original request URL.
The trouble though is that if the upstream app has links with /ViewPower already prefixed, then Caddy would double-up the prefix, unless we use a matcher to not do the rewrite if the path is already there.
But ideally, if it’s possible to configure the upstream app, it would be better if it didn’t require the path.
What is the output of curl -v for requests that you’d expect to work? What URLs does the application expect – is it with or without the /ViewPower/ prefix?
Note that handle_path strips the prefix /ViewPower/.
Also it’s possible your application is redirecting if the proxy is misconfigured for the application, like with regards to Host headers or URI or something.
there was a typo in my earlier post, i did have the {uri} there but it went to the default tomcat home page… but your solution worked for me, thanks a ton