From 2bbf93c2f2183250de4ddfc6fb4c811c7776df0e Mon Sep 17 00:00:00 2001 From: Blake Date: Sat, 25 Apr 2020 10:16:27 -0400 Subject: [PATCH 1/2] use $upstream_port in proxy_set_header $upstream_port is defined in the blocks and used for proxy_pass but not proxy_set_header --- qbittorrent.subdomain.conf.sample | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qbittorrent.subdomain.conf.sample b/qbittorrent.subdomain.conf.sample index dc49215..c8b691e 100644 --- a/qbittorrent.subdomain.conf.sample +++ b/qbittorrent.subdomain.conf.sample @@ -30,7 +30,7 @@ server { proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_set_header Referer ''; - proxy_set_header Host $upstream_app:8080; + proxy_set_header Host $upstream_app:$upstream_port; } location ~ (/qbittorrent)?/api { @@ -44,7 +44,7 @@ server { rewrite /qbittorrent(.*) $1 break; proxy_set_header Referer ''; - proxy_set_header Host $upstream_app:8080; + proxy_set_header Host $upstream_app:$upstream_port; } location ~ (/qbittorrent)?/command { @@ -58,7 +58,7 @@ server { rewrite /qbittorrent(.*) $1 break; proxy_set_header Referer ''; - proxy_set_header Host $upstream_app:8080; + proxy_set_header Host $upstream_app:$upstream_port; } location ~ (/qbittorrent)?/query { @@ -72,7 +72,7 @@ server { rewrite /qbittorrent(.*) $1 break; proxy_set_header Referer ''; - proxy_set_header Host $upstream_app:8080; + proxy_set_header Host $upstream_app:$upstream_port; } location ~ (/qbittorrent)?/login { @@ -86,7 +86,7 @@ server { rewrite /qbittorrent(.*) $1 break; proxy_set_header Referer ''; - proxy_set_header Host $upstream_app:8080; + proxy_set_header Host $upstream_app:$upstream_port; } location ~ (/qbittorrent)?/sync { @@ -100,6 +100,6 @@ server { rewrite /qbittorrent(.*) $1 break; proxy_set_header Referer ''; - proxy_set_header Host $upstream_app:8080; + proxy_set_header Host $upstream_app:$upstream_port; } } From 036c759e9d7d6883f9db987d8338a4e089bdca7d Mon Sep 17 00:00:00 2001 From: Blake Date: Sat, 25 Apr 2020 10:19:04 -0400 Subject: [PATCH 2/2] use $upstream_port in proxy_set_header $upstream_port is defined in the blocks and used for proxy_pass but not proxy_set_header --- qbittorrent.subfolder.conf.sample | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qbittorrent.subfolder.conf.sample b/qbittorrent.subfolder.conf.sample index 7d56b98..1ac7896 100644 --- a/qbittorrent.subfolder.conf.sample +++ b/qbittorrent.subfolder.conf.sample @@ -22,7 +22,7 @@ location ^~ /qbittorrent/ { rewrite /qbittorrent(.*) $1 break; proxy_set_header Referer ''; - proxy_set_header Host $upstream_app:8080; + proxy_set_header Host $upstream_app:$upstream_port; } location ^~ /qbittorrent/api { @@ -36,7 +36,7 @@ location ^~ /qbittorrent/api { rewrite /qbittorrent(.*) $1 break; proxy_set_header Referer ''; - proxy_set_header Host $upstream_app:8080; + proxy_set_header Host $upstream_app:$upstream_port; } location ^~ /qbittorrent/command { @@ -50,7 +50,7 @@ location ^~ /qbittorrent/command { rewrite /qbittorrent(.*) $1 break; proxy_set_header Referer ''; - proxy_set_header Host $upstream_app:8080; + proxy_set_header Host $upstream_app:$upstream_port; } location ^~ /qbittorrent/query { @@ -64,7 +64,7 @@ location ^~ /qbittorrent/query { rewrite /qbittorrent(.*) $1 break; proxy_set_header Referer ''; - proxy_set_header Host $upstream_app:8080; + proxy_set_header Host $upstream_app:$upstream_port; } location ^~ /qbittorrent/login { @@ -78,7 +78,7 @@ location ^~ /qbittorrent/login { rewrite /qbittorrent(.*) $1 break; proxy_set_header Referer ''; - proxy_set_header Host $upstream_app:8080; + proxy_set_header Host $upstream_app:$upstream_port; } location ^~ /qbittorrent/sync { @@ -92,5 +92,5 @@ location ^~ /qbittorrent/sync { rewrite /qbittorrent(.*) $1 break; proxy_set_header Referer ''; - proxy_set_header Host $upstream_app:8080; + proxy_set_header Host $upstream_app:$upstream_port; }