my.domain {
proxy /seedbox 127.0.0.1:3000 {
without /seedbox
websocket
}
tls {
dns cloudflare
}
}
The problem is, my.domain/seedbox can be loaded in the browser, but cloud-torrent itself broke.
In access log, path /realtime is giving a 404 error.
cloud-torrent will work fine if Im using proxy / 127.0.0.1:3000
Proxying subfolders is always a pain unless the backend is configured to handle it properly. Some apps let you specify a URL base which they will assume they must operate under. In your case you’d want the URL base to be /seedbox and you’d ideally not use the without directive, because it only works, uhh, one way.
Caddy’s without directive in this instance will strip /seedbox from the request, so the backend only sees /, but Caddy will not re-add /seedbox to any links generated by the backend.
So the backend is directing people to /realtime when in order for Caddy to properly proxy this request it would need to receive /seedbox/realtime (which it would strip /seedbox from and your backend would get the request for just /realtime). So Caddy is trying to look for a /realtime index or directory instead and 404ing.
I don’t see any way to specify a URL base for cloud-torrent, so you’ll need to give it a full subdomain.