Yes, you can use handle_path
to strip the path prefix before proxying:
site.mymaindomain.com {
handle_path /nr* {
reverse_proxy 55.66.77.88:1880
}
handle {
reverse_proxy 11.22.33.44:80
}
}
Keep in mind though, this isn’t bullet-proof because any URLs in HTML that the upstream app responds with may not work unless the app is configured to prefix them with /nr
. This isn’t something you can solve easily with Caddy config. See this article for an explanation: