Going to stats/monotorix works, this is just an entry endpoint where you can select for which date range to have the logs. After you click OK, it redirects to /monitorix-cgi which breaks. Maybe there is a way to override this from caddy configuration?
Are you sure you didn’t get your two config examples backwards?
This wouldn’t work because it would only match exactly /stats and nothing else. It would need to be /stats*.
But anyway, path matchers in the site address is deprecated and should not be used.
This will match /stats/monotorix, but it will strip /stats from the request before proxying. If you need to keep that part of the path, you should be using handle, not handle_path.
Please completely fill out the help topic template, as per the forum rules. Show your logs, as explained in the template.
Show your full config, not just one part. Things in your import snippets can affect behaviour.
Ah yeah sorry, I got the path backward wrong. No I want to strip the /stats| so /stats/monitorixsends me tolocalhost:8080/monotorix, but after going further in monotorix it completly gets rid of /stats`.
The imports are just some 404 handles, and most things in the config is the caddy-secure configuration. Also the logs all it prints are logs related to caddy-secure.