Has anyone gotten the new Reverse Proxy to work?

Darkmagister
Posts: 48
youtube meble na wymiar Warszawa
Joined: Sat Oct 27, 2018 4:36 pm

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Darkmagister »

yes i understand, i will probably do the one sub domain at a time, because i'm having issue with the path

i've tried to put /radarr/ in the URL Base in radarr so when i access my.domain.it:446/radarr it will work but now it's telling me err_too_many_redirect :(

so i think i will add one subdomain at a time (or create one cert for multiple sub) and then create different reverse entity, but in this way i will have some issue with the port i think??
AS6404T
User avatar
Nazar78
Posts: 2079
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Nazar78 »

Darkmagister wrote:i've tried to put /radarr/ in the URL Base in radarr so when i access my.domain.it:446/radarr it will work but now it's telling me err_too_many_redirect
Try /radarr instead of /radarr/ in the URL base. They are two different things, former is file and the latter is path.

Which radarr version are you using? 2 or 3? I'm still the v2 but I recently also tested v3 and the reverse proxy works but I'm not using paths. I'm also using a lots of subdomain reverse proxies even for websockets. Perhaps I can later try your settings, give more details about it.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
User avatar
Nazar78
Posts: 2079
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Nazar78 »

Ok I just tested apparently when using paths for certain apps will not work because they require websockets which I think the ADM didn't include (I haven't checked the source). E.g. below:

Code: Select all

proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
So for these apps you'll need to remove both reverse proxy paths and app URL base paths and use only subdomains to separate them. Once paths removed, radarr loads.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
Darkmagister
Posts: 48
Joined: Sat Oct 27, 2018 4:36 pm

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Darkmagister »

thanks a lot, i'm using v2

but one question, with subdomain, i can create 3 subdomain:
radarr.domain.it
sonarr.domain.it
lidarr.domain.it

but in the reverse proxy i need for example port 446,447,448 to manage those, and in that case i can not use 443 redirect to 446 in the router...

how can i have 3 domain but without using different port ?? is it possible ?
AS6404T
ilike2burnthing
Posts: 396
Joined: Thu Apr 09, 2020 8:01 pm

Re: Has anyone gotten the new Reverse Proxy to work?

Post by ilike2burnthing »

The only way I could get it to work for all of my containers was to create individual reverse proxies for each one, and port forward each of their new SSL ports on my router. Unfortunately though that means continuing to use ports in their URL.

Portainer and Jackett worked fine with the 443>1443 method, allowing me to replace using a port with just /portainer/ and /jackett/, however Sonarr, Radarr, and Tautulli won't play ball, and Transmission results in a 409 conflict.

I'll use Sonarr as an example to explain what all I tried (the results for Radarr and Tautulli were the same). Apologies for it being repetitive, it's the only way I can show which settings were used.


The first three do not change the URL Base setting in Sonarr

Adding / as the location:
  • - using IP:Port for the domain works when accessing https://[domain]/sonarr/login
Adding /sonarr/ as the location:
  • - using IP:Port for the domain results in a broken login page when accessing https://[domain]/sonarr/login
  • - using IP:Port/sonarr for the domain results in 404 not found when accessing https://[domain]/sonarr/login which redirects to https://[domain]/login?returnUrl=/sonarrlogin

The rest change the URL Base setting in Sonarr to /sonar

Adding /sonarr/ as the location:
  • - using IP:Port for the domain results in too many redirects when accessing https://[domain]/sonarr/login
  • - using IP:Port for the domain results in a broken login page when accessing https://[domain]/sonarr/sonarr/login
  • - using IP:Port/sonarr for the domain results in too many redirects when accessing https://[domain]/sonarr/sonarr/login which redirects to https://[domain]/sonarr/sonarrsonarrsonarrsonarr...sonarr/login
  • - using IP:Port/sonarr for the domain results in too many redirects when accessing https://[domain]/sonarr/login which redirects to https://[domain]/sonarr/sonarrsonarrsonarrsonarr...sonarrlogin
Adding / as the location:
  • - using IP:Port for the domain results in a broken login page when accessing https://[domain]/sonarr/login
  • - using IP:Port/sonarr for the domain results in too many redirects when accessing https://[domain]/sonarr/login which redirects to https://[domain]/sonarr/sonarrsonarr/sonarrsonarr/.../sonarrsonarr/login

If you can make sense of that, then the pattern seems to be that if it were possible to have a trailing forward slash for the domain, these would work fine. I think this is also seen in the 409 conflict for Transmission, where the solution given online is to have a trailing forward slash, but just adding it to the final URL here doesn't work.

Hope that's of some help and can lead to a solution, or someone can spot what I've been doing wrong.

EDIT: I should add that I've checked, and there are no typos in those URLs, that's how they appear.
User avatar
Nazar78
Posts: 2079
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Nazar78 »

Darkmagister wrote:thanks a lot, i'm using v2

but one question, with subdomain, i can create 3 subdomain:
radarr.domain.it
sonarr.domain.it
lidarr.domain.it

but in the reverse proxy i need for example port 446,447,448 to manage those, and in that case i can not use 443 redirect to 446 in the router...

how can i have 3 domain but without using different port ?? is it possible ?
Yes you can use the same port 446 for all the subdomains because it's using a single listening port but differentiated by multiple domains similar to vhosts.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
User avatar
Nazar78
Posts: 2079
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Nazar78 »

ilike2burnthing wrote:...
Seems there's issues with paths on both ends. You can only use subdomains for now or could u try turn off the login?. I'll try to dig further later.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
ilike2burnthing
Posts: 396
Joined: Thu Apr 09, 2020 8:01 pm

Re: Has anyone gotten the new Reverse Proxy to work?

Post by ilike2burnthing »

Did a quick test with Tautulli, removing the login requirement just loads a broken page instead - no images or background, just text.
Darkmagister
Posts: 48
Joined: Sat Oct 27, 2018 4:36 pm

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Darkmagister »

Nazar78 wrote: Yes you can use the same port 446 for all the subdomains because it's using a single listening port but differentiated by multiple domains similar to vhosts.
yess!!!

thanks a lot for all the support, i now have most of the app to work with the reverse proxy, i still have an issue with home assistant, i have create a subdomain: home.domain.it -> 192.168.1.20:8123
enabled the two option in HA config:
use_x_forwarded_for: true
trusted_proxies:
- 192.168.1.20 # (NAS ip as it's the same for reverse proxy and HA)

i can see a login page after the login i get unable to connect and an error:
Firefox non può stabilire una connessione con il server wss://home.domain.it/api/websocket.
GET wss://home.domain.it/api/websocket
[HTTP/1.1 400 Bad Request 116ms]

i've disable ssl from HA and point to http in the reverse proxy (i've tried enabling the ssl but didn't change anything)

is there issue even in straight subdomain for websocket ?
AS6404T
User avatar
Nazar78
Posts: 2079
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Has anyone gotten the new Reverse Proxy to work?

Post by Nazar78 »

ilike2burnthing wrote:Did a quick test with Tautulli, removing the login requirement just loads a broken page instead - no images or background, just text.
I found the culprit! ADM doesn't honor the path we specify. E.g. you put the backend as /radarr/ but ADM will prune the trail '/'. Can you help open a ticket?

This should work:

1. Set radarr base url as /radarr.

2. Set the proxy path as /radarr/.

3. Set the backend path as /radarr/ but it will save as /radarr same goes for #1 and #2 but #2 it will enforce the trailing '/'.

4. Edit this file with your fav editor i.e. vi /volume0/usr/builtin/etc/nginx_reverse_proxy/sites-enabled/<port>_*_<Asustor-ID>.myasustor.com.conf. List the path to get the port and Asustor-ID or replace if you already know them.

5. Add the trailing '/' at line 9: "proxy_pass http://192.168.1.6:17878/radarr/;" then save.

6. Reload nginx:

Code: Select all

kill -HUP $(ps -ef|grep nginx_reverse_proxy|grep -v grep|awk '{print $1}')
7. Test the new config in a new incognito private session to avoid cache. http://Asustor-ID.myasustor.com/radarr/login. Add the port as necessary if you didn't forward port 80 from router to the proxy port.

I'm not sure if this survive reboots as I can't test it now or if ADM notoriously recreate the config but for sure it will revert when you re-edit via ADM.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
Post Reply

Return to “ADM general”