I have caddy setup to redirect main URL requests to a Jellyfin server and some subdomain requests to apps like sonarr, etc. It all works perfectly. Except I cannot get it to redirect XTEVE. the page redirects and hangs, never loads.
4. Error messages and/or full log output:
page hangs blank and never loads
5. What I already tried:
changing the syntax of the caddyfile
researching potential reasons
6. Links to relevant resources:
this is almost certainly an xteve problem not a caddy problem (http->https issues, I don’t know) but I thought perhaps someone here knew a work around.
I’ll check the log, I didn’t know I couldn’t specify a path. Xteve runs on whatever port you tell it (in my case 17122) but if you go to 17122, you get the tuner, not the web admin interface. You have to go to the path to get the interface.
I have a service/app running on port 17122. However, to access the service UI, you have to go to www.myapp.com:17122/web you cannot access it at www.myapp.com:17122. From what I understand from your previous post, caddy cannot forward to a specific path? Is there any workaround for this? I would like
subdomain.myapp.com to be redirected by caddy to the admin login / UI. But that web page requires the path /web
Yes it can, like I said, you need to use a rewrite to change the path before proxying. The reverse_proxy module no longer does rewrites itself (in v1 it did, but it no longer does, separation of concerns, less code overall).
I read the documentation on it and I guess I understand it but I don’t see any examples of syntax specific to reverse proxy. Is there any further information about the rewrite command I could look at?
Thank you. I’m very new to this and don’t understand where in my Caddyfile this would go. I’m also not sure where in that command I would put my specific information. What is web{uri} ? Do I put my url+port number where the * is ? Do I still need a reverse_proxy line in my Caddyfile or does rewrite replace it entirely?
Please read this page in the docs to understand how a Caddyfile is structured:
/web is the prefix you want to add to the URL, and {uri} is a placeholder for “the current URI of the request” (i.e. the path + query).
No, * is a request matcher:
It’s necessary to explicitly use * here because /web{uri} starts with a / which would make the request matcher parsing assume that /web{uri} is your matcher, but that’s not the case, that’s the rewrite target. So you need to put * to make sure that * is used as the matcher (which means “match all requests”).
Yes, because that’s what actually proxies the request. The rewrite directive just modifies the current request being handled, to change the URI (request path and query).
Is there an example of this kind of Caddyfile in use? I don’t really understand some of what you’re saying.
I want
subdomain.dumbdomain.com to reverse_proxy to 127.0.0.1:17122/web
This is the ONLY subdomain that needs a path, everything else in my Caddyfile is working. Is there a sample Caddyfile I could look at to understand it better. I know you’ve linked me to the documentation but they are a little advanced for me.