morph1904 / Tyger2

A Reverse Proxy Application
GNU General Public License v2.0
50 stars 11 forks source link

Subfolder support or only subdomains supported? #30

Closed ksurl closed 3 years ago

ksurl commented 3 years ago

After finally getting it up and running on docker, my 1st test was to put Jackett behind a proxy. It runs plain http on port 9117 in a container on the same docker host. Since there are no notes on what is the supported way to do it, I have been trying different things.

I added a new application with same docker host IP and port 9117, no websocket or transparent proxy enabled. Then I added a new address with a subdomain of a domain I own. It successfully got a LE cert. I can reach the page externally when I assign the app to it but it gives 421 error, site is not served on this interface. I tried adding a url link in the address settings but then it just fails to load anything from external but internally it points to the docker host IP so I go directly to the internal address (no more proxy?).

Am I supposed to be doing 1 subdomain per application? I would prefer sub.domain.tld/app instead of app1.domain.tld, app2.domain.tld, etc.

ksurl commented 3 years ago

seems like it is assumign you will assign 1 subdomain per app. that's fine I guess. now I am running to a different issue. transmission and tautulli work fine since there is no path after the host:port url. plex and jackett have paths after the main domain such as plex:32400/web and jackett:9117/UI/Dashboard. I think that is what is breaking the proxy. it just fails to load anything. Is that what the url alias is for in the address section?

morph1904 commented 3 years ago

Hi.

I have jacket running in a container using

linuxserver/jackett:latest

I am using subdomains, but you do not have to. Once you have added a domain or subdomain as a proxy to an application, you can use this option to add a URL proxy to your domain. image Here you can add a URI path to proxy to a specific app. image

I recommend that for most apps you have the transparent option switched ON. and for anything like vSphere you will probably need websockets too. This solves most similar issues by passing through the correct headers etc to the app.

Its likely your issues in your second post is due to the lack of the transparency option.

I am running Plex, Sonarr, Raddar, Sabnzbd, Apache Guacamole, vSphere, Deluge, Ombi, Heimdall, Hydra2, Tautulli, Jacket, Windows Admin Center, Tyger2, Cachet, Gitlab, Unifi, and more all proxied using Tyger2 Beta build

I admit there is a subdomain for each one but as explained above there doesn't have to be.

ksurl commented 3 years ago

Thanks, I will try the url proxy option and enable websocket/transparent options (does it ever hurt to do so if it is not needed?)

morph1904 commented 3 years ago

Not really no. If the app does not use websockets, no data gets sent using the ws:// protocol, so no harm there. As for transparent, most consumer grade apps will require it. There are some apps that have some issues with it but they tend to be advanced. Not all apps are explicit about what header config they need, so if something doesn't work, just switch it off and see if it solves the issue. The change is instant, so not hard to try out.

morph1904 commented 3 years ago

Here is the info if you ever need it:

transparent: Passes through host information from the original request as most backend apps would expect. Shorthand for: header_upstream Host {host} header_upstream X-Real-IP {remote} header_upstream X-Forwarded-For {remote} header_upstream X-Forwarded-Proto {scheme}

ksurl commented 3 years ago

so the url proxy option works for transmission (setting Heimdall as the main landing page at root). I will have to play around with the other ones since they are not working out of the box. in this case, Jackett, Plex, Tautulli (tautulli did work as its own subdomain, but not as a url proxy under a subdomain)

ksurl commented 3 years ago

do you mind posting your urls for jacket and plex and tautulli? I've tried every combo of toggling the options and the url paths without any luck. direct connect locally works fine (IP:port).

ksurl commented 3 years ago

nevermind. I was able to get the rest up and running with individual subdomains. the only odd one out was plex, had to append web/index.html as a proxy url. and each one had their own cname dns record pointing to my ddns domain so I don't have to update them all, just the ddns IP.

morph1904 commented 3 years ago

That is odd. My plex subdomain is an A record on cloudflare, I have plex set up as this: image

My subdomain is this: image

This works fine for me. Be aware that you need to set the access address in some apps. In my Plex server settings have added the address as this:

image