From 8a4a92b2bbea99214281e0aa131d52e7fe9a8d29 Mon Sep 17 00:00:00 2001 From: pwatk Date: Sat, 13 Feb 2021 11:38:09 +0000 Subject: [PATCH 1/2] Create aria2-with-webui.subdomain.conf.sample --- aria2-with-webui.subdomain.conf.sample | 64 ++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 aria2-with-webui.subdomain.conf.sample diff --git a/aria2-with-webui.subdomain.conf.sample b/aria2-with-webui.subdomain.conf.sample new file mode 100644 index 0000000..d989593 --- /dev/null +++ b/aria2-with-webui.subdomain.conf.sample @@ -0,0 +1,64 @@ +## Version 2020/12/09 +# Make sure that your dns has a cname set for aria2 and that your aria2-with-webui container is not using a base url +# +# The RPC port will need to be changed to 443 in the AriaNg/WebUI-Aria2 settings or by using the AriaNg command api +# e.g. https://aria2.example.com/#!/settings/rpc/set/https/aria2.example.com/443/jsonrpc +# https://aria2.example.com/#!/settings/rpc/set?protocol=https&host=aria2.example.com&port=443&interface=aria2-with-webui/jsonrpc + +server { + listen 443 ssl; + listen [::]:443 ssl; + + server_name aria2.*; + + include /config/nginx/ssl.conf; + + client_max_body_size 0; + + # enable for ldap auth, fill in ldap details in ldap.conf + #include /config/nginx/ldap.conf; + + # enable for Authelia + #include /config/nginx/authelia-server.conf; + + location / { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable the next two lines for ldap auth + #auth_request /auth; + #error_page 401 =200 /ldaplogin; + + # enable for Authelia + #include /config/nginx/authelia-location.conf; + + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app aria2-with-webui; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } + + location ~ (/aria2-with-webui)?/jsonrpc { + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app aria2-with-webui; + set $upstream_port 6800; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port/jsonrpc; + + } + + location ~ (/aria2-with-webui)?/rpc { + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app aria2-with-webui; + set $upstream_port 6800; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port/rpc; + + } +} From cec2e43151c373991f008cae7a64a1ba72b71b95 Mon Sep 17 00:00:00 2001 From: pwatk Date: Fri, 21 May 2021 09:43:26 +0100 Subject: [PATCH 2/2] Update aria2-with-webui.subdomain.conf.sample Updated to reflect recent changes to template --- aria2-with-webui.subdomain.conf.sample | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aria2-with-webui.subdomain.conf.sample b/aria2-with-webui.subdomain.conf.sample index d989593..ddb5f25 100644 --- a/aria2-with-webui.subdomain.conf.sample +++ b/aria2-with-webui.subdomain.conf.sample @@ -1,4 +1,4 @@ -## Version 2020/12/09 +## Version 2021/05/18 # Make sure that your dns has a cname set for aria2 and that your aria2-with-webui container is not using a base url # # The RPC port will need to be changed to 443 in the AriaNg/WebUI-Aria2 settings or by using the AriaNg command api @@ -34,7 +34,7 @@ server { #include /config/nginx/authelia-location.conf; include /config/nginx/proxy.conf; - resolver 127.0.0.11 valid=30s; + include /config/nginx/resolver.conf; set $upstream_app aria2-with-webui; set $upstream_port 80; set $upstream_proto http; @@ -44,7 +44,7 @@ server { location ~ (/aria2-with-webui)?/jsonrpc { include /config/nginx/proxy.conf; - resolver 127.0.0.11 valid=30s; + include /config/nginx/resolver.conf; set $upstream_app aria2-with-webui; set $upstream_port 6800; set $upstream_proto http; @@ -54,7 +54,7 @@ server { location ~ (/aria2-with-webui)?/rpc { include /config/nginx/proxy.conf; - resolver 127.0.0.11 valid=30s; + include /config/nginx/resolver.conf; set $upstream_app aria2-with-webui; set $upstream_port 6800; set $upstream_proto http;