From 7f83edf5492eb6c7e4175409beeea32e6c41281d Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Thu, 20 Feb 2020 21:57:00 -0600 Subject: [PATCH 1/2] Fix jackett api locations --- jackett.subdomain.conf.sample | 12 +++++++++++- jackett.subfolder.conf.sample | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/jackett.subdomain.conf.sample b/jackett.subdomain.conf.sample index a51fe08..69b4ecd 100644 --- a/jackett.subdomain.conf.sample +++ b/jackett.subdomain.conf.sample @@ -31,7 +31,17 @@ server { } - location ~ (/jackett)?/(api|dl) { + location ~ (/jackett)?/api { + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app jackett; + set $upstream_port 9117; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } + + location ~ (/jackett)?/dl { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app jackett; diff --git a/jackett.subfolder.conf.sample b/jackett.subfolder.conf.sample index 7e04001..f67020e 100644 --- a/jackett.subfolder.conf.sample +++ b/jackett.subfolder.conf.sample @@ -1,6 +1,6 @@ # first go into jackett settings, set the URL Base to /jackett and restart the jackett container -location /jackett { +location ^~ /jackett { # enable the next two lines for http auth #auth_basic "Restricted"; #auth_basic_user_file /config/nginx/.htpasswd; @@ -18,7 +18,17 @@ location /jackett { } -location ~ /jackett/(api|dl) { +location ^~ /jackett/api { + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app jackett; + set $upstream_port 9117; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + +} + +location ^~ /jackett/dl { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app jackett; From 3d6e33bb76ce07dbbee8933f8fa0d2c3f3a22278 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Thu, 20 Feb 2020 22:04:21 -0600 Subject: [PATCH 2/2] Fix qbittorrent subdomain api locations --- qbittorrent.subdomain.conf.sample | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qbittorrent.subdomain.conf.sample b/qbittorrent.subdomain.conf.sample index da5f79f..dc49215 100644 --- a/qbittorrent.subdomain.conf.sample +++ b/qbittorrent.subdomain.conf.sample @@ -33,7 +33,7 @@ server { proxy_set_header Host $upstream_app:8080; } - location ^~ /qbittorrent/api { + location ~ (/qbittorrent)?/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; @@ -47,7 +47,7 @@ server { proxy_set_header Host $upstream_app:8080; } - location ^~ /qbittorrent/command { + location ~ (/qbittorrent)?/command { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; @@ -61,7 +61,7 @@ server { proxy_set_header Host $upstream_app:8080; } - location ^~ /qbittorrent/query { + location ~ (/qbittorrent)?/query { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; @@ -75,7 +75,7 @@ server { proxy_set_header Host $upstream_app:8080; } - location ^~ /qbittorrent/login { + location ~ (/qbittorrent)?/login { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; @@ -89,7 +89,7 @@ server { proxy_set_header Host $upstream_app:8080; } - location ^~ /qbittorrent/sync { + location ~ (/qbittorrent)?/sync { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent;