diff --git a/adguard.subdomain.conf.sample b/adguard.subdomain.conf.sample index 21c601ceb..6f409df7d 100644 --- a/adguard.subdomain.conf.sample +++ b/adguard.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app adguard; - proxy_pass http://$upstream_app; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/adminer.subfolder.conf.sample b/adminer.subfolder.conf.sample index 5d3545b57..ec0f55a9f 100644 --- a/adminer.subfolder.conf.sample +++ b/adminer.subfolder.conf.sample @@ -15,5 +15,8 @@ location ^~ /adminer/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app adminer; - proxy_pass http://$upstream_app:8080; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/airsonic.subdomain.conf.sample b/airsonic.subdomain.conf.sample index 605ee6e09..80c1831ac 100644 --- a/airsonic.subdomain.conf.sample +++ b/airsonic.subdomain.conf.sample @@ -21,10 +21,13 @@ server { # enable the next two lines for ldap auth #auth_request /auth; #error_page 401 =200 /login; - + include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app airsonic; - proxy_pass http://$upstream_app:4040; + set $upstream_port 4040; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/airsonic.subfolder.conf.sample b/airsonic.subfolder.conf.sample index e509e62fc..44be55c33 100644 --- a/airsonic.subfolder.conf.sample +++ b/airsonic.subfolder.conf.sample @@ -12,5 +12,8 @@ location ^~ /airsonic { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app airsonic; - proxy_pass http://$upstream_app:4040; + set $upstream_port 4040; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/bazarr.subdomain.conf.sample b/bazarr.subdomain.conf.sample index 56306f8bb..c8054a17f 100644 --- a/bazarr.subdomain.conf.sample +++ b/bazarr.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app bazarr; - proxy_pass http://$upstream_app:6767; + set $upstream_port 6767; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/bazarr.subfolder.conf.sample b/bazarr.subfolder.conf.sample index 9cff8f4ab..a9bec6e90 100644 --- a/bazarr.subfolder.conf.sample +++ b/bazarr.subfolder.conf.sample @@ -15,5 +15,8 @@ location ^~ /bazarr/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app bazarr; - proxy_pass http://$upstream_app:6767; + set $upstream_port 6767; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/beets.subdomain.conf.sample b/beets.subdomain.conf.sample index 48731706b..38d604ec1 100644 --- a/beets.subdomain.conf.sample +++ b/beets.subdomain.conf.sample @@ -1,4 +1,4 @@ -#First edit beets.yml and enable the reverse proxy settings, under "web" add "reverse_proxy: true" and restart the beets container. +#First edit beets.yml and enable the reverse proxy settings, under "web" add "reverse_proxy: true" and restart the beets container. #Make sure that your dns has a cname set for beets and that your beets container is not using a base url server { @@ -26,6 +26,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app beets; - proxy_pass http://$upstream_app:8337; + set $upstream_port 8337; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/beets.subfolder.conf.sample b/beets.subfolder.conf.sample index 3bfacb9ee..559e70de6 100644 --- a/beets.subfolder.conf.sample +++ b/beets.subfolder.conf.sample @@ -12,7 +12,10 @@ location /beets { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app beets; - proxy_pass http://$upstream_app:8337; + set $upstream_port 8337; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Scheme $scheme; diff --git a/bitwarden.subdomain.conf.sample b/bitwarden.subdomain.conf.sample index 03112d0f4..59daab60c 100644 --- a/bitwarden.subdomain.conf.sample +++ b/bitwarden.subdomain.conf.sample @@ -26,14 +26,20 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app bitwarden; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location /notifications/hub { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app bitwarden; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; } @@ -42,7 +48,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app bitwarden; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/booksonic.subdomain.conf.sample b/booksonic.subdomain.conf.sample index 01c44684c..9f60aa563 100644 --- a/booksonic.subdomain.conf.sample +++ b/booksonic.subdomain.conf.sample @@ -21,10 +21,13 @@ server { # enable the next two lines for ldap auth #auth_request /auth; #error_page 401 =200 /login; - + include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app booksonic; - proxy_pass http://$upstream_app:4040; + set $upstream_port 4040; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/booksonic.subfolder.conf.sample b/booksonic.subfolder.conf.sample index e205ceeeb..203c2be6e 100644 --- a/booksonic.subfolder.conf.sample +++ b/booksonic.subfolder.conf.sample @@ -12,5 +12,8 @@ location ^~ /booksonic { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app booksonic; - proxy_pass http://$upstream_app:4040; + set $upstream_port 4040; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/calibre-web.subdomain.conf.sample b/calibre-web.subdomain.conf.sample index 60547908c..54e122ae8 100644 --- a/calibre-web.subdomain.conf.sample +++ b/calibre-web.subdomain.conf.sample @@ -25,7 +25,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app calibre-web; - proxy_pass http://$upstream_app:8083; + set $upstream_port 8083; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Host $http_host; proxy_set_header X-Scheme $scheme; } diff --git a/calibre-web.subfolder.conf.sample b/calibre-web.subfolder.conf.sample index 1da0096c3..42bfd0e4b 100644 --- a/calibre-web.subfolder.conf.sample +++ b/calibre-web.subfolder.conf.sample @@ -14,7 +14,10 @@ location ^~ /calibre-web/ { resolver 127.0.0.11 valid=30s; set $upstream_app calibre-web; - proxy_pass http://$upstream_app:8083; + set $upstream_port 8083; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Host $http_host; proxy_set_header X-Scheme $scheme; proxy_set_header X-Script-Name /calibre-web; diff --git a/calibre.subdomain.conf.sample b/calibre.subdomain.conf.sample index adb63731e..8bc93e2d1 100644 --- a/calibre.subdomain.conf.sample +++ b/calibre.subdomain.conf.sample @@ -24,7 +24,10 @@ server { resolver 127.0.0.11 valid=30s; set $upstream_app calibre; - proxy_pass http://$upstream_app:8080; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_buffering off; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; diff --git a/calibre.subfolder.conf.sample b/calibre.subfolder.conf.sample index 8b2bfacf1..94b48d56c 100644 --- a/calibre.subfolder.conf.sample +++ b/calibre.subfolder.conf.sample @@ -1,4 +1,4 @@ -# calibre does not require a base url setting +# calibre does not require a base url setting location /calibre { return 301 $scheme://$host/calibre/; @@ -14,6 +14,9 @@ location ^~ /calibre/ { resolver 127.0.0.11 valid=30s; set $upstream_app calibre; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /calibre(.*) $1 break; - proxy_pass http://$upstream_app:8080; } diff --git a/code-server.subdomain.conf.sample b/code-server.subdomain.conf.sample index 0a7ce86a5..abeb37a07 100644 --- a/code-server.subdomain.conf.sample +++ b/code-server.subdomain.conf.sample @@ -25,7 +25,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app code-server; - proxy_pass http://$upstream_app:8443; + set $upstream_port 8443; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection upgrade; } diff --git a/codimd.subdomain.conf.sample b/codimd.subdomain.conf.sample index c05100874..847297890 100644 --- a/codimd.subdomain.conf.sample +++ b/codimd.subdomain.conf.sample @@ -27,6 +27,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app codimd; - proxy_pass http://$upstream_app:3000; + set $upstream_port 3000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } -} \ No newline at end of file +} diff --git a/collabora.subdomain.conf.sample b/collabora.subdomain.conf.sample index bfe53eea0..caebc04db 100644 --- a/collabora.subdomain.conf.sample +++ b/collabora.subdomain.conf.sample @@ -12,7 +12,10 @@ server { location ^~ /loleaflet { resolver 127.0.0.11 valid=30s; set $upstream_app collabora; - proxy_pass https://$upstream_app:9980; + set $upstream_port 9980; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Host $http_host; } @@ -20,7 +23,10 @@ server { location ^~ /hosting/discovery { resolver 127.0.0.11 valid=30s; set $upstream_app collabora; - proxy_pass https://$upstream_app:9980; + set $upstream_port 9980; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Host $http_host; } @@ -28,7 +34,10 @@ server { location ^~ /hosting/capabilities { resolver 127.0.0.11 valid=30s; set $upstream_app collabora; - proxy_pass https://$upstream_app:9980; + set $upstream_port 9980; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Host $http_host; } @@ -36,7 +45,10 @@ server { location ~ ^/lool/(.*)/ws$ { resolver 127.0.0.11 valid=30s; set $upstream_app collabora; - proxy_pass https://$upstream_app:9980; + set $upstream_port 9980; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; @@ -47,7 +59,10 @@ server { location ~ ^/lool { resolver 127.0.0.11 valid=30s; set $upstream_app collabora; - proxy_pass https://$upstream_app:9980; + set $upstream_port 9980; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Host $http_host; } @@ -55,7 +70,10 @@ server { location ^~ /lool/adminws { resolver 127.0.0.11 valid=30s; set $upstream_app collabora; - proxy_pass https://$upstream_app:9980; + set $upstream_port 9980; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; diff --git a/couchpotato.subdomain.conf.sample b/couchpotato.subdomain.conf.sample index 27a0288ce..d72a016a6 100644 --- a/couchpotato.subdomain.conf.sample +++ b/couchpotato.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app couchpotato; - proxy_pass http://$upstream_app:5050; + set $upstream_port 5050; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/couchpotato.subfolder.conf.sample b/couchpotato.subfolder.conf.sample index 937a14fc0..24aae5f6f 100644 --- a/couchpotato.subfolder.conf.sample +++ b/couchpotato.subfolder.conf.sample @@ -12,5 +12,8 @@ location ^~ /couchpotato { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app couchpotato; - proxy_pass http://$upstream_app:5050; + set $upstream_port 5050; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/deluge.subdomain.conf.sample b/deluge.subdomain.conf.sample index b43cc3f5e..1bf40cd7f 100644 --- a/deluge.subdomain.conf.sample +++ b/deluge.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app deluge; - proxy_pass http://$upstream_app:8112; + set $upstream_port 8112; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/deluge.subfolder.conf.sample b/deluge.subfolder.conf.sample index d1f4f9acb..13b550d22 100644 --- a/deluge.subfolder.conf.sample +++ b/deluge.subfolder.conf.sample @@ -15,7 +15,10 @@ location ^~ /deluge/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app deluge; + set $upstream_port 8112; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /deluge(.*) $1 break; - proxy_pass http://$upstream_app:8112; proxy_set_header X-Deluge-Base "/deluge/"; } diff --git a/dillinger.subdomain.conf.sample b/dillinger.subdomain.conf.sample index 97f7a885b..16d1e482a 100644 --- a/dillinger.subdomain.conf.sample +++ b/dillinger.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app dillinger; - proxy_pass http://$upstream_app:8080; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } -} \ No newline at end of file +} diff --git a/dokuwiki.subdomain.conf.sample b/dokuwiki.subdomain.conf.sample index 5f81c7f08..a2655e372 100644 --- a/dokuwiki.subdomain.conf.sample +++ b/dokuwiki.subdomain.conf.sample @@ -1,4 +1,4 @@ -# First complete the setup by appending install.php to URL. +# First complete the setup by appending install.php to URL. # Make sure that your dns has a cname set for dokuwiki server { @@ -26,6 +26,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app dokuwiki; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/domoticz.subdomain.conf.sample b/domoticz.subdomain.conf.sample index 226e1062e..9dc19aabe 100644 --- a/domoticz.subdomain.conf.sample +++ b/domoticz.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app domoticz; - proxy_pass http://$upstream_app:8080; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } -} \ No newline at end of file +} diff --git a/domoticz.subfolder.conf.sample b/domoticz.subfolder.conf.sample index c8a77fc2c..ecd50c8a8 100644 --- a/domoticz.subfolder.conf.sample +++ b/domoticz.subfolder.conf.sample @@ -12,5 +12,8 @@ location ^~ /domoticz/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app domoticz; - proxy_pass http://$upstream_app:8080; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/dozzle.subfolder.conf.sample b/dozzle.subfolder.conf.sample index 6fd42721a..b433de04a 100644 --- a/dozzle.subfolder.conf.sample +++ b/dozzle.subfolder.conf.sample @@ -18,5 +18,8 @@ location ^~ /dozzle/ { proxy_cache off; resolver 127.0.0.11 valid=30s; set $upstream_app dozzle; - proxy_pass http://$upstream_app:8080; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/duplicati.subdomain.conf.sample b/duplicati.subdomain.conf.sample index f6dc7a7f7..7e9a4d387 100644 --- a/duplicati.subdomain.conf.sample +++ b/duplicati.subdomain.conf.sample @@ -24,6 +24,9 @@ server { resolver 127.0.0.11 valid=30s; set $upstream_app duplicati; - proxy_pass http://$upstream_app:8200; + set $upstream_port 8200; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/duplicati.subfolder.conf.sample b/duplicati.subfolder.conf.sample index 263f8a71d..c7d580ca3 100644 --- a/duplicati.subfolder.conf.sample +++ b/duplicati.subfolder.conf.sample @@ -14,6 +14,9 @@ location ^~ /duplicati/ { resolver 127.0.0.11 valid=30s; set $upstream_app duplicati; + set $upstream_port 8200; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /duplicati(.*) $1 break; - proxy_pass http://$upstream_app:8200; } diff --git a/emby.subdomain.conf.sample b/emby.subdomain.conf.sample index 9efad40e7..f828be616 100644 --- a/emby.subdomain.conf.sample +++ b/emby.subdomain.conf.sample @@ -1,6 +1,7 @@ -# make sure that your dns has a cname set for emby, if emby is running in bridge mode, the below config should work as is, although, -# the container name is expected to be "emby", if not, replace the lines "set $upstream_app emby;" with "set $upstream_app ;" -# for host mode, replace the lines "proxy_pass http://$upstream_app:8096;" with "proxy_pass http://HOSTIP:8096;" HOSTIP being the IP address of emby +# make sure that your dns has a cname set for emby and that your emby container is not using a base url +# if emby is running in bridge mode and the container is named "emby", the below config should work as is +# if not, replace the line "set $upstream_app emby;" with "set $upstream_app ;" +# or "set $upstream_app ;" for host mode, HOSTIP being the IP address of emby # in emby settings, under "Advanced" change the public https port to 443, leave the local ports as is, set the "external domain" to your url, # and set the "Secure connection mode" to "Handled by reverse proxy" @@ -18,18 +19,22 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app emby; - proxy_pass http://$upstream_app:8096; - + set $upstream_port 8096; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; } - + location ~ (/emby)?/socket { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app emby; - proxy_pass http://$upstream_app:8096; - + set $upstream_port 8096; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; } diff --git a/emby.subfolder.conf.sample b/emby.subfolder.conf.sample index 7d62fd5d0..f114167c9 100644 --- a/emby.subfolder.conf.sample +++ b/emby.subfolder.conf.sample @@ -1,6 +1,7 @@ -# if emby is running in bridge mode, the below config should work as is, although, the container name is expected to be "emby", -# if not, replace the lines "set $upstream_app emby;" with "set $upstream_app ;" -# for host mode, replace the lines "proxy_pass http://$upstream_app:8096;" with "proxy_pass http://HOSTIP:8096;" HOSTIP being the IP address of emby +# make sure that your dns has a cname set for emby +# if emby is running in bridge mode and the container is named "emby", the below config should work as is +# if not, replace the line "set $upstream_app emby;" with "set $upstream_app ;" +# or "set $upstream_app ;" for host mode, HOSTIP being the IP address of emby # in emby settings, under "Advanced" change the public https port to 443, leave the local ports as is, set the "external domain" to your url and subdomain, # and set the "Secure connection mode" to "Handled by reverse proxy" @@ -11,8 +12,10 @@ location ^~ /emby/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app emby; - proxy_pass http://$upstream_app:8096; - + set $upstream_port 8096; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; } @@ -21,7 +24,9 @@ location ^~ /embywebsocket { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app emby; - proxy_pass http://$upstream_app:8096; + set $upstream_port 8096; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; diff --git a/embystat.subdomain.conf.sample b/embystat.subdomain.conf.sample index b166cf818..37e0d4b90 100644 --- a/embystat.subdomain.conf.sample +++ b/embystat.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app embystat; - proxy_pass http://$upstream_app:6555; + set $upstream_port 6555; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/flood.subdomain.conf.sample b/flood.subdomain.conf.sample index 0ab0f3ce4..bb371583d 100644 --- a/flood.subdomain.conf.sample +++ b/flood.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app flood; - proxy_pass http://$upstream_app:3000; + set $upstream_port 3000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/flood.subfolder.conf.sample b/flood.subfolder.conf.sample index caa98b4d6..b6dff642b 100644 --- a/flood.subfolder.conf.sample +++ b/flood.subfolder.conf.sample @@ -15,6 +15,9 @@ location ^~ /flood/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app flood; + set $upstream_port 3000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /flood(.*) $1 break; - proxy_pass http://$upstream_app:3000; } diff --git a/freshrss.subdomain.conf.sample b/freshrss.subdomain.conf.sample index aba0e341f..762016985 100644 --- a/freshrss.subdomain.conf.sample +++ b/freshrss.subdomain.conf.sample @@ -25,8 +25,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app freshrss; - proxy_pass http://$upstream_app; - + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_redirect off; proxy_buffering off; proxy_set_header Host $host; diff --git a/freshrss.subfolder.conf.sample b/freshrss.subfolder.conf.sample index 497f4007e..d7b0ae767 100644 --- a/freshrss.subfolder.conf.sample +++ b/freshrss.subfolder.conf.sample @@ -16,9 +16,11 @@ location ^~ /freshrss/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app freshrss; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /freshrss(.*) $1 break; - proxy_pass http://$upstream_app:80; - proxy_redirect off; proxy_buffering off; proxy_set_header Host $host; diff --git a/ghost.subdomain.conf.sample b/ghost.subdomain.conf.sample index c6b38e4e9..370cbfe62 100644 --- a/ghost.subdomain.conf.sample +++ b/ghost.subdomain.conf.sample @@ -25,7 +25,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ghost; - proxy_pass http://$upstream_app:2368; - proxy_redirect off; - } + set $upstream_port 2368; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + proxy_redirect off; + } } diff --git a/ghost.subfolder.conf.sample b/ghost.subfolder.conf.sample index 18491eea6..b6310f710 100644 --- a/ghost.subfolder.conf.sample +++ b/ghost.subfolder.conf.sample @@ -9,10 +9,13 @@ location /blog { #enable the next two lines for ldap auth, also customize and enable ldap.conf in the default conf #auth_request /auth; #error_page 401 =200 /login; - + include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ghost; - proxy_pass http://$upstream_app:2368; + set $upstream_port 2368; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_redirect off; } diff --git a/gitea.subdomain.conf.sample b/gitea.subdomain.conf.sample index 05d5dc373..c957cb376 100644 --- a/gitea.subdomain.conf.sample +++ b/gitea.subdomain.conf.sample @@ -4,8 +4,6 @@ # ROOT_URL = https://gitea.server.com/ # DOMAIN = gitea.server.com - - server { listen 443 ssl; listen [::]:443 ssl; @@ -31,6 +29,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app gitea; - proxy_pass http://$upstream_app:3000; + set $upstream_port 3000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/gitea.subfolder.conf.sample b/gitea.subfolder.conf.sample index 9b2aff0bc..8d37eab62 100644 --- a/gitea.subfolder.conf.sample +++ b/gitea.subfolder.conf.sample @@ -12,6 +12,9 @@ location ^~ /gitea/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app gitea; + set $upstream_port 3000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /gitea(.*) $1 break; - proxy_pass http://$upstream_app:3000; } diff --git a/glances.subdomain.conf.sample b/glances.subdomain.conf.sample index bbe846d2c..fd619e9f9 100644 --- a/glances.subdomain.conf.sample +++ b/glances.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app glances; - proxy_pass http://$upstream_app:61208; + set $upstream_port 61208; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/glances.subfolder.conf.sample b/glances.subfolder.conf.sample index 701bd6aa7..611a6e359 100644 --- a/glances.subfolder.conf.sample +++ b/glances.subfolder.conf.sample @@ -15,6 +15,9 @@ location ^~ /glances/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app glances; + set $upstream_port 61208; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /glances(.*) $1 break; - proxy_pass http://$upstream_app:61208; } diff --git a/grafana.subdomain.conf.sample b/grafana.subdomain.conf.sample index 67af2cf11..519010694 100644 --- a/grafana.subdomain.conf.sample +++ b/grafana.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app grafana; - proxy_pass http://$upstream_app:3000; + set $upstream_port 3000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/grocy.subdomain.conf.sample b/grocy.subdomain.conf.sample index e4c070532..6bd603c8f 100644 --- a/grocy.subdomain.conf.sample +++ b/grocy.subdomain.conf.sample @@ -25,7 +25,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app grocy; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } -} \ No newline at end of file +} diff --git a/guacamole.subdomain.conf.sample b/guacamole.subdomain.conf.sample index e74eef11e..3b449b08a 100644 --- a/guacamole.subdomain.conf.sample +++ b/guacamole.subdomain.conf.sample @@ -26,6 +26,9 @@ server { proxy_buffering off; resolver 127.0.0.11 valid=30s; set $upstream_app guacamole; - proxy_pass http://$upstream_app:8080; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/guacamole.subfolder.conf.sample b/guacamole.subfolder.conf.sample index 0ab197881..074461da4 100644 --- a/guacamole.subfolder.conf.sample +++ b/guacamole.subfolder.conf.sample @@ -16,6 +16,9 @@ location ^~ /guacamole/ { proxy_buffering off; resolver 127.0.0.11 valid=30s; set $upstream_app guacamole; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /guacamole(.*) $1 break; - proxy_pass http://$upstream_app:8080; } diff --git a/headphones.subdomain.conf.sample b/headphones.subdomain.conf.sample index 5e91780c4..68daa690e 100644 --- a/headphones.subdomain.conf.sample +++ b/headphones.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app headphones; - proxy_pass http://$upstream_app:8181; + set $upstream_port 8181; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/headphones.subfolder.conf.sample b/headphones.subfolder.conf.sample index 70499e03f..7c4c56db2 100644 --- a/headphones.subfolder.conf.sample +++ b/headphones.subfolder.conf.sample @@ -12,5 +12,8 @@ location ^~ /headphones { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app headphones; - proxy_pass http://$upstream_app:8181; + set $upstream_port 8181; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/heimdall.subdomain.conf.sample b/heimdall.subdomain.conf.sample index 3df0abe1d..1f97e6930 100644 --- a/heimdall.subdomain.conf.sample +++ b/heimdall.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app heimdall; - proxy_pass https://$upstream_app:443; + set $upstream_port 443; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/heimdall.subfolder.conf.sample b/heimdall.subfolder.conf.sample index bdd81b375..50b92d047 100644 --- a/heimdall.subfolder.conf.sample +++ b/heimdall.subfolder.conf.sample @@ -12,5 +12,8 @@ location / { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app heimdall; - proxy_pass https://$upstream_app:443; + set $upstream_port 443; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/homeassistant.subdomain.conf.sample b/homeassistant.subdomain.conf.sample index b906d4311..07d8fd165 100644 --- a/homeassistant.subdomain.conf.sample +++ b/homeassistant.subdomain.conf.sample @@ -25,13 +25,19 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app homeassistant; - proxy_pass http://$upstream_app:8123; + set $upstream_port 8123; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location /api/websocket { resolver 127.0.0.11 valid=30s; set $upstream_app homeassistant; - proxy_pass http://$upstream_app:8123; + set $upstream_port 8123; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Host $host; proxy_http_version 1.1; diff --git a/jackett.subdomain.conf.sample b/jackett.subdomain.conf.sample index 017d06e1a..a51fe08ba 100644 --- a/jackett.subdomain.conf.sample +++ b/jackett.subdomain.conf.sample @@ -25,13 +25,19 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app jackett; - proxy_pass http://$upstream_app:9117; + set $upstream_port 9117; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/jackett)?/(api|dl) { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app jackett; - proxy_pass http://$upstream_app:9117; + set $upstream_port 9117; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/jackett.subfolder.conf.sample b/jackett.subfolder.conf.sample index 3ed1b738d..7e040013f 100644 --- a/jackett.subfolder.conf.sample +++ b/jackett.subfolder.conf.sample @@ -12,12 +12,18 @@ location /jackett { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app jackett; - proxy_pass http://$upstream_app:9117; + set $upstream_port 9117; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ /jackett/(api|dl) { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app jackett; - proxy_pass http://$upstream_app:9117; + set $upstream_port 9117; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/jellyfin.subdomain.conf.sample b/jellyfin.subdomain.conf.sample index 763da9153..88c25e185 100644 --- a/jellyfin.subdomain.conf.sample +++ b/jellyfin.subdomain.conf.sample @@ -1,6 +1,7 @@ -# make sure that your dns has a cname set for jellyfin, if jellyfin is running in bridge mode, the below config should work as is, although, -# the container name is expected to be "jellyfin", if not, replace the lines "set $upstream_app jellyfin;" with "set $upstream_app ;" -# for host mode, replace the lines "proxy_pass http://$upstream_app:8096;" with "proxy_pass http://HOSTIP:8096;" HOSTIP being the IP address of jellyfin +# make sure that your dns has a cname set for jellyfin +# if jellyfin is running in bridge mode and the container is named "jellyfin", the below config should work as is +# if not, replace the line "set $upstream_app jellyfin;" with "set $upstream_app ;" +# or "set $upstream_app ;" for host mode, HOSTIP being the IP address of jellyfin # in jellyfin settings, under "Advanced/Networking" change the public https port to 443, leave the local ports as is, # and set the "Secure connection mode" to "Handled by reverse proxy" @@ -18,18 +19,22 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app jellyfin; - proxy_pass http://$upstream_app:8096; - + set $upstream_port 8096; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; } - + location ~ (/jellyfin)?/socket { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app jellyfin; - proxy_pass http://$upstream_app:8096; - + set $upstream_port 8096; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; } diff --git a/jellyfin.subfolder.conf.sample b/jellyfin.subfolder.conf.sample index 2db81432f..abebb571d 100644 --- a/jellyfin.subfolder.conf.sample +++ b/jellyfin.subfolder.conf.sample @@ -1,6 +1,7 @@ -# if jellyfin is running in bridge mode, the below config should work as is, although, the container name is expected to be "jellyfin", -# if not, replace the lines "set $upstream_app jellyfin;" with "set $upstream_app ;" -# for host mode, replace the lines "proxy_pass http://$upstream_app:8096;" with "proxy_pass http://HOSTIP:8096;" HOSTIP being the IP address of jellyfin +# make sure that your dns has a cname set for jellyfin +# if jellyfin is running in bridge mode and the container is named "jellyfin", the below config should work as is +# if not, replace the line "set $upstream_app jellyfin;" with "set $upstream_app ;" +# or "set $upstream_app ;" for host mode, HOSTIP being the IP address of jellyfin # in jellyfin settings, under "Advanced/Networking" change the public https port to 443, leave the local ports as is, set the base url to "/jellyfin", # and set the "Secure connection mode" to "Handled by reverse proxy" @@ -11,8 +12,10 @@ location ^~ /jellyfin/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app jellyfin; - proxy_pass http://$upstream_app:8096; - + set $upstream_port 8096; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; proxy_set_header Upgrade $http_upgrade; diff --git a/jenkins.subfolder.conf.sample b/jenkins.subfolder.conf.sample index 9c3333574..cfef5ceb1 100644 --- a/jenkins.subfolder.conf.sample +++ b/jenkins.subfolder.conf.sample @@ -17,13 +17,16 @@ location ^~ /jenkins/ { client_max_body_size 10m; sendfile off; - + include /config/nginx/proxy.conf; proxy_max_temp_file_size 0; proxy_temp_file_write_size 64k; proxy_request_buffering off; proxy_buffering off; resolver 127.0.0.11 valid=30s; - set $upstream_app jenkins; - proxy_pass http://$upstream_app:8080; -} \ No newline at end of file + set $upstream_app jenkins; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + +} diff --git a/kanzi.subdomain.conf.sample b/kanzi.subdomain.conf.sample index e4784670b..bf92ef47a 100644 --- a/kanzi.subdomain.conf.sample +++ b/kanzi.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app kanzi; - proxy_pass https://$upstream_app:8000; + set $upstream_port 8000; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/kanzi.subfolder.conf.sample b/kanzi.subfolder.conf.sample index 2e3b585e2..6227cfd7c 100644 --- a/kanzi.subfolder.conf.sample +++ b/kanzi.subfolder.conf.sample @@ -15,6 +15,9 @@ location ^~ /kanzi/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app kanzi; + set $upstream_port 8000; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /kanzi(.*) $1 break; - proxy_pass https://$upstream_app:8000; } diff --git a/lazylibrarian.subdomain.conf.sample b/lazylibrarian.subdomain.conf.sample index c9d3a7720..ada4918c5 100644 --- a/lazylibrarian.subdomain.conf.sample +++ b/lazylibrarian.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app lazylibrarian; - proxy_pass http://$upstream_app:5299; + set $upstream_port 5299; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/lazylibrarian.subfolder.conf.sample b/lazylibrarian.subfolder.conf.sample index 93f26d680..682822a9a 100644 --- a/lazylibrarian.subfolder.conf.sample +++ b/lazylibrarian.subfolder.conf.sample @@ -12,5 +12,8 @@ location ^~ /lazylibrarian { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app lazylibrarian; - proxy_pass http://$upstream_app:5299; + set $upstream_port 5299; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/librespeed.subdomain.com.sample b/librespeed.subdomain.com.sample index 1fc43887c..e66804bc4 100644 --- a/librespeed.subdomain.com.sample +++ b/librespeed.subdomain.com.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app librespeed; - proxy_pass http://$upstream_app; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/lidarr.subdomain.conf.sample b/lidarr.subdomain.conf.sample index c982d731d..36d267cb6 100644 --- a/lidarr.subdomain.conf.sample +++ b/lidarr.subdomain.conf.sample @@ -25,13 +25,19 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app lidarr; - proxy_pass http://$upstream_app:8686; + set $upstream_port 8686; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/lidarr)?/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app lidarr; - proxy_pass http://$upstream_app:8686; + set $upstream_port 8686; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/lidarr.subfolder.conf.sample b/lidarr.subfolder.conf.sample index bd2e9bf9a..f1ffee682 100644 --- a/lidarr.subfolder.conf.sample +++ b/lidarr.subfolder.conf.sample @@ -12,12 +12,18 @@ location ^~ /lidarr { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app lidarr; - proxy_pass http://$upstream_app:8686; + set $upstream_port 8686; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ^~ /lidarr/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app lidarr; - proxy_pass http://$upstream_app:8686; + set $upstream_port 8686; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/lychee.subdomain.conf.sample b/lychee.subdomain.conf.sample index 1c2619165..4c6619e06 100644 --- a/lychee.subdomain.conf.sample +++ b/lychee.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app lychee; - proxy_pass http://$upstream_app; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/medusa.subdomain.conf.sample b/medusa.subdomain.conf.sample index 452d0db87..a9bbcd2da 100644 --- a/medusa.subdomain.conf.sample +++ b/medusa.subdomain.conf.sample @@ -27,6 +27,9 @@ server { proxy_set_header Connection "upgrade"; resolver 127.0.0.11 valid=30s; set $upstream_app medusa; - proxy_pass http://$upstream_app:8081; + set $upstream_port 8081; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/medusa.subfolder.conf.sample b/medusa.subfolder.conf.sample index 9010f6deb..193574417 100644 --- a/medusa.subfolder.conf.sample +++ b/medusa.subfolder.conf.sample @@ -14,5 +14,8 @@ location ^~ /medusa { proxy_set_header Connection "upgrade"; resolver 127.0.0.11 valid=30s; set $upstream_app medusa; - proxy_pass http://$upstream_app:8081; + set $upstream_port 8081; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/monitorr.subdomain.conf.sample b/monitorr.subdomain.conf.sample index fc5d9027b..79572fb14 100644 --- a/monitorr.subdomain.conf.sample +++ b/monitorr.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app monitorr; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/monitorr.subfolder.conf.sample b/monitorr.subfolder.conf.sample index 69e84bf6b..da4fde266 100644 --- a/monitorr.subfolder.conf.sample +++ b/monitorr.subfolder.conf.sample @@ -15,5 +15,8 @@ location ^~ /monitorr/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app monitorr; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/mstream.subdomain.conf.sample b/mstream.subdomain.conf.sample index c6aa2e745..c1da8e247 100644 --- a/mstream.subdomain.conf.sample +++ b/mstream.subdomain.conf.sample @@ -21,10 +21,13 @@ server { # enable the next two lines for ldap auth #auth_request /auth; #error_page 401 =200 /login; - + include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app mstream; - proxy_pass http://$upstream_app:3000; + set $upstream_port 3000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/mylar.subdomain.conf.sample b/mylar.subdomain.conf.sample index 9d001be3e..2438a3019 100644 --- a/mylar.subdomain.conf.sample +++ b/mylar.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app mylar; - proxy_pass http://$upstream_app:8090; + set $upstream_port 8090; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/mylar.subfolder.conf.sample b/mylar.subfolder.conf.sample index b35fb4400..d1bd203ee 100644 --- a/mylar.subfolder.conf.sample +++ b/mylar.subfolder.conf.sample @@ -12,5 +12,8 @@ location ^~ /mylar { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app mylar; - proxy_pass http://$upstream_app:8090; + set $upstream_port 8090; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/mytinytodo.subfolder.conf.sample b/mytinytodo.subfolder.conf.sample index 39c65de62..bb727e19e 100644 --- a/mytinytodo.subfolder.conf.sample +++ b/mytinytodo.subfolder.conf.sample @@ -17,5 +17,7 @@ location ^~ /todo/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app mytinytodo; - proxy_pass http://$upstream_app:80/; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port/; } diff --git a/netdata.subdomain.conf.sample b/netdata.subdomain.conf.sample index 75771911e..3d14ea553 100644 --- a/netdata.subdomain.conf.sample +++ b/netdata.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app netdata; - proxy_pass http://$upstream_app:19999; + set $upstream_port 19999; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/netdata.subfolder.conf.sample b/netdata.subfolder.conf.sample index efc52ca27..f41325e40 100644 --- a/netdata.subfolder.conf.sample +++ b/netdata.subfolder.conf.sample @@ -15,6 +15,9 @@ location ^~ /netdata/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app netdata; + set $upstream_port 19999; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /netdata(.*) $1 break; - proxy_pass http://$upstream_app:19999; } diff --git a/nextcloud.subdomain.conf.sample b/nextcloud.subdomain.conf.sample index 1acf745f2..ab2281cc4 100644 --- a/nextcloud.subdomain.conf.sample +++ b/nextcloud.subdomain.conf.sample @@ -26,7 +26,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app nextcloud; + set $upstream_port 443; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_max_temp_file_size 2048m; - proxy_pass https://$upstream_app:443; } } diff --git a/nextcloud.subfolder.conf.sample b/nextcloud.subfolder.conf.sample index d16853dcc..7b14687b8 100644 --- a/nextcloud.subfolder.conf.sample +++ b/nextcloud.subfolder.conf.sample @@ -27,9 +27,11 @@ location ^~ /nextcloud/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app nextcloud; + set $upstream_port 443; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /nextcloud(.*) $1 break; - proxy_pass https://$upstream_app:443; - proxy_max_temp_file_size 2048m; proxy_set_header Range $http_range; @@ -37,4 +39,4 @@ location ^~ /nextcloud/ { proxy_set_header Connection $http_connection; proxy_redirect off; proxy_ssl_session_reuse off; -} +} diff --git a/nzbget.subdomain.conf.sample b/nzbget.subdomain.conf.sample index cd3de0ce6..97f7376be 100644 --- a/nzbget.subdomain.conf.sample +++ b/nzbget.subdomain.conf.sample @@ -25,27 +25,39 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app nzbget; - proxy_pass http://$upstream_app:6789; + set $upstream_port 6789; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/nzbget)?(/[^\/:]*:[^\/:]*)?/jsonrpc { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app nzbget; - proxy_pass http://$upstream_app:6789; + set $upstream_port 6789; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/nzbget)?(/[^\/:]*:[^\/]*)?/jsonprpc { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app nzbget; - proxy_pass http://$upstream_app:6789; + set $upstream_port 6789; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/nzbget)?(/[^\/:]*:[^\/]*)?/xmlrpc { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app nzbget; - proxy_pass http://$upstream_app:6789; + set $upstream_port 6789; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/nzbget.subfolder.conf.sample b/nzbget.subfolder.conf.sample index c700f58fc..906331d35 100644 --- a/nzbget.subfolder.conf.sample +++ b/nzbget.subfolder.conf.sample @@ -12,26 +12,38 @@ location /nzbget { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app nzbget; - proxy_pass http://$upstream_app:6789; + set $upstream_port 6789; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ /nzbget(/[^\/:]*:[^\/]*)?/jsonrpc { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app nzbget; - proxy_pass http://$upstream_app:6789; + set $upstream_port 6789; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ /nzbget(/[^\/:]*:[^\/]*)?/jsonprpc { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app nzbget; - proxy_pass http://$upstream_app:6789; + set $upstream_port 6789; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ /nzbget(/[^\/:]*:[^\/]*)?/xmlrpc { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app nzbget; - proxy_pass http://$upstream_app:6789; + set $upstream_port 6789; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/nzbhydra.subdomain.conf.sample b/nzbhydra.subdomain.conf.sample index 536558e96..f8d2a8197 100644 --- a/nzbhydra.subdomain.conf.sample +++ b/nzbhydra.subdomain.conf.sample @@ -25,42 +25,60 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app hydra2; - proxy_pass http://$upstream_app:5076; + set $upstream_port 5076; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/nzbhydra)?/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app hydra2; - proxy_pass http://$upstream_app:5076; + set $upstream_port 5076; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/nzbhydra)?/getnzb { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app hydra2; - proxy_pass http://$upstream_app:5076; + set $upstream_port 5076; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/nzbhydra)?/gettorrent { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app hydra2; - proxy_pass http://$upstream_app:5076; + set $upstream_port 5076; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/nzbhydra)?/rss { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app hydra2; - proxy_pass http://$upstream_app:5076; + set $upstream_port 5076; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/nzbhydra)?/torznab/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app hydra2; - proxy_pass http://$upstream_app:5076; + set $upstream_port 5076; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/nzbhydra.subfolder.conf.sample b/nzbhydra.subfolder.conf.sample index dc3abed15..0bc40c153 100644 --- a/nzbhydra.subfolder.conf.sample +++ b/nzbhydra.subfolder.conf.sample @@ -12,40 +12,58 @@ location ^~ /nzbhydra { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app hydra2; - proxy_pass http://$upstream_app:5076; + set $upstream_port 5076; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ^~ /nzbhydra/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app hydra2; - proxy_pass http://$upstream_app:5076; + set $upstream_port 5076; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ^~ /nzbhydra/getnzb { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app hydra2; - proxy_pass http://$upstream_app:5076; + set $upstream_port 5076; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ^~ /nzbhydra/gettorrent { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app hydra2; - proxy_pass http://$upstream_app:5076; + set $upstream_port 5076; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ^~ /nzbhydra/rss { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app hydra2; - proxy_pass http://$upstream_app:5076; + set $upstream_port 5076; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ^~ /nzbhydra/torznab/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app hydra2; - proxy_pass http://$upstream_app:5076; + set $upstream_port 5076; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/ombi.subdomain.conf.sample b/ombi.subdomain.conf.sample index e6b71e119..862aa1020 100644 --- a/ombi.subdomain.conf.sample +++ b/ombi.subdomain.conf.sample @@ -25,7 +25,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ombi; - proxy_pass http://$upstream_app:3579; + set $upstream_port 3579; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } # This allows access to the actual api @@ -33,7 +36,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ombi; - proxy_pass http://$upstream_app:3579; + set $upstream_port 3579; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } # This allows access to the documentation for the api @@ -41,7 +47,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ombi; - proxy_pass http://$upstream_app:3579; + set $upstream_port 3579; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } if ($http_referer ~* /ombi) { rewrite ^/swagger/(.*) /ombi/swagger/$1? redirect; diff --git a/ombi.subfolder.conf.sample b/ombi.subfolder.conf.sample index 4c0231420..1cea0150c 100644 --- a/ombi.subfolder.conf.sample +++ b/ombi.subfolder.conf.sample @@ -16,7 +16,10 @@ location ^~ /ombi/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ombi; - proxy_pass http://$upstream_app:3579; + set $upstream_port 3579; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } # This allows access to the actual api @@ -24,7 +27,10 @@ location ^~ /ombi/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ombi; - proxy_pass http://$upstream_app:3579; + set $upstream_port 3579; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } if ($http_referer ~* /ombi) { rewrite ^/api/(.*) /ombi/api/$1? redirect; @@ -35,7 +41,10 @@ location ^~ /ombi/swagger { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ombi; - proxy_pass http://$upstream_app:3579; + set $upstream_port 3579; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } if ($http_referer ~* /ombi) { rewrite ^/swagger/(.*) /ombi/swagger/$1? redirect; diff --git a/openvpn-as.subdomain.conf.sample b/openvpn-as.subdomain.conf.sample index 5be12156b..3b0803df7 100644 --- a/openvpn-as.subdomain.conf.sample +++ b/openvpn-as.subdomain.conf.sample @@ -25,7 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app openvpn-as; - proxy_pass https://$upstream_app:943; + set $upstream_port 943; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; } @@ -41,6 +43,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app openvpn-as; - proxy_pass https://$upstream_app:943; + set $upstream_port 943; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/organizr-auth.subfolder.conf.sample b/organizr-auth.subfolder.conf.sample index 3bb22dad3..b8c358dde 100644 --- a/organizr-auth.subfolder.conf.sample +++ b/organizr-auth.subfolder.conf.sample @@ -18,7 +18,9 @@ location ~ /auth-([0-9]+) { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app organizr; - proxy_pass http://$upstream_app:80/api/?v1/auth&group=$1; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port/api/?v1/auth&group=$1; proxy_set_header Content-Length ""; # Do not uncomment the lines below, these are examples for usue in other proxy configs diff --git a/organizr.subdomain.conf.sample b/organizr.subdomain.conf.sample index 78b95a533..4bd4ff3f2 100644 --- a/organizr.subdomain.conf.sample +++ b/organizr.subdomain.conf.sample @@ -25,7 +25,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app organizr; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } # Optional redirect server errors to organizr error pages diff --git a/organizr.subfolder.conf.sample b/organizr.subfolder.conf.sample index 11df71c3f..aae5afff6 100644 --- a/organizr.subfolder.conf.sample +++ b/organizr.subfolder.conf.sample @@ -12,7 +12,10 @@ location / { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app organizr; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } # Optional redirect server errors to organizr error pages diff --git a/osticket.subdomain.conf.sample b/osticket.subdomain.conf.sample index e2ef2d5b6..f79c5970b 100644 --- a/osticket.subdomain.conf.sample +++ b/osticket.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app osticket; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/phpmyadmin.subdomain.conf.sample b/phpmyadmin.subdomain.conf.sample index 623f29fa7..83844e44e 100644 --- a/phpmyadmin.subdomain.conf.sample +++ b/phpmyadmin.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app phpmyadmin; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/phpmyadmin.subfolder.conf.sample b/phpmyadmin.subfolder.conf.sample index 727f35c66..c9ddee073 100644 --- a/phpmyadmin.subfolder.conf.sample +++ b/phpmyadmin.subfolder.conf.sample @@ -15,6 +15,9 @@ location ^~ /phpmyadmin/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app phpmyadmin; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /phpmyadmin(.*) $1 break; - proxy_pass http://$upstream_app:80; } diff --git a/pihole.subdomain.conf.sample b/pihole.subdomain.conf.sample index 5b0ecd642..145d7cf6c 100644 --- a/pihole.subdomain.conf.sample +++ b/pihole.subdomain.conf.sample @@ -25,7 +25,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app pihole; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_hide_header X-Frame-Options; } @@ -41,7 +44,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app pihole; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_hide_header X-Frame-Options; } } diff --git a/pihole.subfolder.conf.sample b/pihole.subfolder.conf.sample index b1b399a14..b6c58773f 100644 --- a/pihole.subfolder.conf.sample +++ b/pihole.subfolder.conf.sample @@ -15,8 +15,11 @@ location ^~ /pihole/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app pihole; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /pihole(.*) $1 break; - proxy_pass http://$upstream_app:80; proxy_hide_header X-Frame-Options; } @@ -35,7 +38,10 @@ location ^~ /pihole/admin/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app pihole; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /pihole(.*) $1 break; - proxy_pass http://$upstream_app:80; proxy_hide_header X-Frame-Options; } diff --git a/piwigo.subdomain.conf.sample b/piwigo.subdomain.conf.sample index 71585c2b9..e3339455e 100644 --- a/piwigo.subdomain.conf.sample +++ b/piwigo.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app piwigo; - proxy_pass http://$upstream_app; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/plex.subdomain.conf.sample b/plex.subdomain.conf.sample index 89330bfae..aa435131b 100644 --- a/plex.subdomain.conf.sample +++ b/plex.subdomain.conf.sample @@ -1,5 +1,7 @@ -# make sure that your dns has a cname set for plex, if plex is running in bridge mode, the below config should work as is, for host mode, -# replace the line "proxy_pass http://$upstream_app:32400;" with "proxy_pass http://HOSTIP:32400;" HOSTIP being the IP address of plex +# make sure that your dns has a cname set for plex +# if plex is running in bridge mode and the container is named "plex", the below config should work as is +# if not, replace the line "set $upstream_app plex;" with "set $upstream_app ;" +# or "set $upstream_app ;" for host mode, HOSTIP being the IP address of plex # in plex server settings, under network, fill in "Custom server access URLs" with your domain (ie. "https://plex.yourdomain.url:443") server { @@ -16,8 +18,6 @@ server { # enable for ldap auth, fill in ldap details in ldap.conf #include /config/nginx/ldap.conf; - - location / { # enable the next two lines for http auth #auth_basic "Restricted"; @@ -30,7 +30,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app plex; - proxy_pass http://$upstream_app:32400; + set $upstream_port 32400; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; diff --git a/plex.subfolder.conf.sample b/plex.subfolder.conf.sample index 7fbafc717..9953ba6a8 100644 --- a/plex.subfolder.conf.sample +++ b/plex.subfolder.conf.sample @@ -1,9 +1,9 @@ #******** This config no longer works as intended. The web app loads, but no direct connection to server is made. ********* #******** PRs welcome for anyone who figures out how to fix it. Use the subdomain config in the meantime. ******* -# plex does not require a base url setting -# if plex is running in bridge mode, the below config should work as is. -# for host mode, replace the line "proxy_pass http://$upstream_app:32400;" with "proxy_pass http://HOSTIP:32400;" HOSTIP being the IP address of plex +# if plex is running in bridge mode and the container is named "plex", the below config should work as is +# if not, replace the line "set $upstream_app plex;" with "set $upstream_app ;" +# or "set $upstream_app ;" for host mode, HOSTIP being the IP address of plex # in plex server settings, under network, fill in "Custom server access URLs" with your domain (ie. "https://yourdomain.url:443/plex") location /plex { @@ -21,8 +21,11 @@ location ^~ /plex/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app plex; + set $upstream_port 32400; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /plex(.*) $1 break; - proxy_pass http://$upstream_app:32400; proxy_set_header X-Plex-Client-Identifier $http_x_plex_client_identifier; proxy_set_header X-Plex-Device $http_x_plex_device; diff --git a/plexwebtools.subdomain.conf.sample b/plexwebtools.subdomain.conf.sample index c740c4648..247f152de 100644 --- a/plexwebtools.subdomain.conf.sample +++ b/plexwebtools.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app plex; - proxy_pass http://$upstream_app:33400; + set $upstream_port 33400; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/plexwebtools.subfolder.conf.sample b/plexwebtools.subfolder.conf.sample index 08da7c3de..7c880dd75 100644 --- a/plexwebtools.subfolder.conf.sample +++ b/plexwebtools.subfolder.conf.sample @@ -15,5 +15,8 @@ location ^~ /plexwebtools/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app plex; - proxy_pass http://$upstream_app:33400; + set $upstream_port 33400; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/portainer.subdomain.conf.sample b/portainer.subdomain.conf.sample index 93d354c17..4b9ca3404 100644 --- a/portainer.subdomain.conf.sample +++ b/portainer.subdomain.conf.sample @@ -24,7 +24,10 @@ server { resolver 127.0.0.11 valid=30s; set $upstream_app portainer; - proxy_pass http://$upstream_app:9000; + set $upstream_port 9000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Connection ""; proxy_http_version 1.1; proxy_hide_header X-Frame-Options; # Possibly nott needed after Portainer 1.20.0 @@ -41,7 +44,10 @@ server { resolver 127.0.0.11 valid=30s; set $upstream_app portainer; - proxy_pass http://$upstream_app:9000; + set $upstream_port 9000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_http_version 1.1; diff --git a/portainer.subfolder.conf.sample b/portainer.subfolder.conf.sample index bbfbd81bf..00adcd4f4 100644 --- a/portainer.subfolder.conf.sample +++ b/portainer.subfolder.conf.sample @@ -15,8 +15,11 @@ location ^~ /portainer/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app portainer; + set $upstream_port 9000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /portainer(.*) $1 break; - proxy_pass http://$upstream_app:9000; proxy_hide_header X-Frame-Options; # Possibly nott needed after Portainer 1.20.0 } @@ -24,8 +27,11 @@ location ^~ /portainer/api/websocket/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app portainer; + set $upstream_port 9000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /portainer(.*) $1 break; - proxy_pass http://$upstream_app:9000; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_hide_header X-Frame-Options; # Possibly nott needed after Portainer 1.20.0 diff --git a/prometheus.subdomain.conf.sample b/prometheus.subdomain.conf.sample index 8f856a95f..b93b816ad 100644 --- a/prometheus.subdomain.conf.sample +++ b/prometheus.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app prometheus; - proxy_pass http://$upstream_app:9090; + set $upstream_port 9090; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/pydio.subdomain.conf.sample b/pydio.subdomain.conf.sample index c780ba345..97617f27b 100644 --- a/pydio.subdomain.conf.sample +++ b/pydio.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app pydio; - proxy_pass https://$upstream_app:443; + set $upstream_port 443; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/pyload.subdomain.conf.sample b/pyload.subdomain.conf.sample index 3fdfc4ac9..4822cd7ec 100644 --- a/pyload.subdomain.conf.sample +++ b/pyload.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app pyload; - proxy_pass http://$upstream_app:8000; + set $upstream_port 8000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/qbittorrent.subdomain.conf.sample b/qbittorrent.subdomain.conf.sample index cad5eaa0c..da5f79f74 100644 --- a/qbittorrent.subdomain.conf.sample +++ b/qbittorrent.subdomain.conf.sample @@ -25,7 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; - proxy_pass http://$upstream_app:8080; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_set_header Referer ''; proxy_set_header Host $upstream_app:8080; @@ -35,8 +37,11 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /qbittorrent(.*) $1 break; - proxy_pass http://$upstream_app:8080; proxy_set_header Referer ''; proxy_set_header Host $upstream_app:8080; @@ -46,8 +51,11 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /qbittorrent(.*) $1 break; - proxy_pass http://$upstream_app:8080; proxy_set_header Referer ''; proxy_set_header Host $upstream_app:8080; @@ -57,8 +65,11 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /qbittorrent(.*) $1 break; - proxy_pass http://$upstream_app:8080; proxy_set_header Referer ''; proxy_set_header Host $upstream_app:8080; @@ -68,8 +79,11 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /qbittorrent(.*) $1 break; - proxy_pass http://$upstream_app:8080; proxy_set_header Referer ''; proxy_set_header Host $upstream_app:8080; @@ -79,8 +93,11 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /qbittorrent(.*) $1 break; - proxy_pass http://$upstream_app:8080; proxy_set_header Referer ''; proxy_set_header Host $upstream_app:8080; diff --git a/qbittorrent.subfolder.conf.sample b/qbittorrent.subfolder.conf.sample index 1c97b027f..7d56b98e0 100644 --- a/qbittorrent.subfolder.conf.sample +++ b/qbittorrent.subfolder.conf.sample @@ -15,8 +15,11 @@ location ^~ /qbittorrent/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /qbittorrent(.*) $1 break; - proxy_pass http://$upstream_app:8080; proxy_set_header Referer ''; proxy_set_header Host $upstream_app:8080; @@ -26,8 +29,11 @@ location ^~ /qbittorrent/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /qbittorrent(.*) $1 break; - proxy_pass http://$upstream_app:8080; proxy_set_header Referer ''; proxy_set_header Host $upstream_app:8080; @@ -37,8 +43,11 @@ location ^~ /qbittorrent/command { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /qbittorrent(.*) $1 break; - proxy_pass http://$upstream_app:8080; proxy_set_header Referer ''; proxy_set_header Host $upstream_app:8080; @@ -48,8 +57,11 @@ location ^~ /qbittorrent/query { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /qbittorrent(.*) $1 break; - proxy_pass http://$upstream_app:8080; proxy_set_header Referer ''; proxy_set_header Host $upstream_app:8080; @@ -59,8 +71,11 @@ location ^~ /qbittorrent/login { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /qbittorrent(.*) $1 break; - proxy_pass http://$upstream_app:8080; proxy_set_header Referer ''; proxy_set_header Host $upstream_app:8080; @@ -70,8 +85,11 @@ location ^~ /qbittorrent/sync { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app qbittorrent; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /qbittorrent(.*) $1 break; - proxy_pass http://$upstream_app:8080; proxy_set_header Referer ''; proxy_set_header Host $upstream_app:8080; diff --git a/quassel-web.subdomain.conf.sample b/quassel-web.subdomain.conf.sample index ff71b0738..3358c0700 100644 --- a/quassel-web.subdomain.conf.sample +++ b/quassel-web.subdomain.conf.sample @@ -1,4 +1,4 @@ -# make sure that your dns has a cname set for quassel and make sure Quassel-Web is running on http +# make sure that your dns has a cname set for quassel and make sure Quassel-Web is running on http # with -e 'HTTPS'='false' or if you're using -e 'ADVANCED'='true' by editing config.json appropriately server { @@ -26,6 +26,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app quassel-web; - proxy_pass http://$upstream_app:64080; + set $upstream_port 64080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/quassel-web.subfolder.conf.sample b/quassel-web.subfolder.conf.sample index 95bc32fa6..cbe5891d1 100644 --- a/quassel-web.subfolder.conf.sample +++ b/quassel-web.subfolder.conf.sample @@ -1,4 +1,4 @@ -# Set base-url with docker run command env variable -e 'URL_BASE'='/quassel' and make sure Quassel-Web is running on http +# Set base-url with docker run command env variable -e 'URL_BASE'='/quassel' and make sure Quassel-Web is running on http # with -e 'HTTPS'='false' or if you're using -e 'ADVANCED'='true' by editing config.json appropriately location ^~ /quassel { @@ -13,5 +13,8 @@ location ^~ /quassel { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app quassel-web; - proxy_pass http://$upstream_app:64080; + set $upstream_port 64080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/radarr.subdomain.conf.sample b/radarr.subdomain.conf.sample index 9d65e769c..cccfccf33 100644 --- a/radarr.subdomain.conf.sample +++ b/radarr.subdomain.conf.sample @@ -25,13 +25,19 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app radarr; - proxy_pass http://$upstream_app:7878; + set $upstream_port 7878; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/radarr)?/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app radarr; - proxy_pass http://$upstream_app:7878; + set $upstream_port 7878; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/radarr.subfolder.conf.sample b/radarr.subfolder.conf.sample index bd9073ae2..a2a3f889b 100644 --- a/radarr.subfolder.conf.sample +++ b/radarr.subfolder.conf.sample @@ -12,12 +12,18 @@ location ^~ /radarr { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app radarr; - proxy_pass http://$upstream_app:7878; + set $upstream_port 7878; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ^~ /radarr/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app radarr; - proxy_pass http://$upstream_app:7878; + set $upstream_port 7878; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/raneto.subdomain.conf.sample b/raneto.subdomain.conf.sample index 0bf8a7c63..945a6db6d 100644 --- a/raneto.subdomain.conf.sample +++ b/raneto.subdomain.conf.sample @@ -24,6 +24,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app raneto; - proxy_pass http://$upstream_app:3000; + set $upstream_port 3000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } -} \ No newline at end of file +} diff --git a/resilio-sync.subdomain.conf.sample b/resilio-sync.subdomain.conf.sample index 89f7a1e3c..58fb60b34 100644 --- a/resilio-sync.subdomain.conf.sample +++ b/resilio-sync.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app resilio-sync; - proxy_pass http://$upstream_app:8888; + set $upstream_port 8888; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/rutorrent.subdomain.conf.sample b/rutorrent.subdomain.conf.sample index 93caeb504..a8183ef74 100644 --- a/rutorrent.subdomain.conf.sample +++ b/rutorrent.subdomain.conf.sample @@ -25,13 +25,19 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app rutorrent; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location /RPC2 { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app rutorrent; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/rutorrent.subfolder.conf.sample b/rutorrent.subfolder.conf.sample index 7ba390181..dd74886d2 100644 --- a/rutorrent.subfolder.conf.sample +++ b/rutorrent.subfolder.conf.sample @@ -15,14 +15,20 @@ location ^~ /rutorrent/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app rutorrent; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /rutorrent(.*) $1 break; - proxy_pass http://$upstream_app:80; } location ^~ /rutorrent/RPC2 { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app rutorrent; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /rutorrent(.*) $1 break; - proxy_pass http://$upstream_app:80; } diff --git a/sabnzbd.subdomain.conf.sample b/sabnzbd.subdomain.conf.sample index 38b7fd502..f6f6d9f58 100644 --- a/sabnzbd.subdomain.conf.sample +++ b/sabnzbd.subdomain.conf.sample @@ -27,13 +27,19 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app sabnzbd; - proxy_pass http://$upstream_app:8080; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/sabnzbd)?/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app sabnzbd; - proxy_pass http://$upstream_app:8080; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/sabnzbd.subfolder.conf.sample b/sabnzbd.subfolder.conf.sample index 14cb9a812..d916a08b9 100644 --- a/sabnzbd.subfolder.conf.sample +++ b/sabnzbd.subfolder.conf.sample @@ -12,12 +12,18 @@ location ^~ /sabnzbd { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app sabnzbd; - proxy_pass http://$upstream_app:8080; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ^~ /sabnzbd/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app sabnzbd; - proxy_pass http://$upstream_app:8080; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/scope.subfolder.conf.sample b/scope.subfolder.conf.sample index 24fe4e62d..853c36164 100644 --- a/scope.subfolder.conf.sample +++ b/scope.subfolder.conf.sample @@ -15,8 +15,11 @@ location ^~ /scope/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app scope; + set $upstream_port 4040; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /scope(.*) $1 break; - proxy_pass http://$upstream_app:4040; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; -} \ No newline at end of file +} diff --git a/sickrage.subdomain.conf.sample b/sickrage.subdomain.conf.sample index d468ad72a..3c6882f7c 100644 --- a/sickrage.subdomain.conf.sample +++ b/sickrage.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app sickrage; - proxy_pass http://$upstream_app:8081; + set $upstream_port 8081; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/sickrage.subfolder.conf.sample b/sickrage.subfolder.conf.sample index eecc90a39..5f8ea3bcc 100644 --- a/sickrage.subfolder.conf.sample +++ b/sickrage.subfolder.conf.sample @@ -12,5 +12,8 @@ location ^~ /sickrage { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app sickrage; - proxy_pass http://$upstream_app:8081; + set $upstream_port 8081; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/smokeping.subdomain.conf.sample b/smokeping.subdomain.conf.sample index d14659bf4..a3d642e58 100644 --- a/smokeping.subdomain.conf.sample +++ b/smokeping.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app smokeping; - proxy_pass http://$upstream_app; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/smokeping.subfolder.conf.sample b/smokeping.subfolder.conf.sample index 3ff68aa57..f265640ab 100644 --- a/smokeping.subfolder.conf.sample +++ b/smokeping.subfolder.conf.sample @@ -12,5 +12,8 @@ location ^~ /smokeping { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app smokeping; - proxy_pass http://$upstream_app; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/sonarr.subdomain.conf.sample b/sonarr.subdomain.conf.sample index 780020929..5ff6e37a9 100644 --- a/sonarr.subdomain.conf.sample +++ b/sonarr.subdomain.conf.sample @@ -25,13 +25,19 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app sonarr; - proxy_pass http://$upstream_app:8989; + set $upstream_port 8989; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/sonarr)?/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app sonarr; - proxy_pass http://$upstream_app:8989; + set $upstream_port 8989; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/sonarr.subfolder.conf.sample b/sonarr.subfolder.conf.sample index 30cc50a9e..3f3405968 100644 --- a/sonarr.subfolder.conf.sample +++ b/sonarr.subfolder.conf.sample @@ -12,12 +12,18 @@ location ^~ /sonarr { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app sonarr; - proxy_pass http://$upstream_app:8989; + set $upstream_port 8989; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ^~ /sonarr/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app sonarr; - proxy_pass http://$upstream_app:8989; + set $upstream_port 8989; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/statping.subdomain.conf.sample b/statping.subdomain.conf.sample index 43a4280fc..1e99282a2 100644 --- a/statping.subdomain.conf.sample +++ b/statping.subdomain.conf.sample @@ -27,6 +27,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app statup; - proxy_pass http://$upstream_app:8080; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/syncthing.subdomain.conf.sample b/syncthing.subdomain.conf.sample index ba8070233..a674ff641 100644 --- a/syncthing.subdomain.conf.sample +++ b/syncthing.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app syncthing; - proxy_pass http://$upstream_app:8384; + set $upstream_port 8384; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/taisun.subdomain.conf.sample b/taisun.subdomain.conf.sample index 7e1b51c8c..583678786 100644 --- a/taisun.subdomain.conf.sample +++ b/taisun.subdomain.conf.sample @@ -25,7 +25,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app taisun; - proxy_pass http://$upstream_app:3000; + set $upstream_port 3000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_buffering off; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; diff --git a/tautulli.subdomain.conf.sample b/tautulli.subdomain.conf.sample index 0b1591271..ff5efcf6c 100644 --- a/tautulli.subdomain.conf.sample +++ b/tautulli.subdomain.conf.sample @@ -25,13 +25,19 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app tautulli; - proxy_pass http://$upstream_app:8181; + set $upstream_port 8181; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ~ (/tautulli)?/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app tautulli; - proxy_pass http://$upstream_app:8181; + set $upstream_port 8181; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/tautulli.subfolder.conf.sample b/tautulli.subfolder.conf.sample index 814ed0806..6a70ef5e6 100644 --- a/tautulli.subfolder.conf.sample +++ b/tautulli.subfolder.conf.sample @@ -12,12 +12,18 @@ location ^~ /tautulli { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app tautulli; - proxy_pass http://$upstream_app:8181; + set $upstream_port 8181; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ^~ /tautulli/api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app tautulli; - proxy_pass http://$upstream_app:8181; + set $upstream_port 8181; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/tdarr.subdomain.conf.sample b/tdarr.subdomain.conf.sample index d22aa71a4..806801d69 100644 --- a/tdarr.subdomain.conf.sample +++ b/tdarr.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app tdarr; - proxy_pass http://$upstream_app:8265; + set $upstream_port 8265; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/thelounge.subdomain.conf.sample b/thelounge.subdomain.conf.sample index e3dbf89bf..9eb957845 100644 --- a/thelounge.subdomain.conf.sample +++ b/thelounge.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app thelounge; - proxy_pass http://$upstream_app:9000; + set $upstream_port 9000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/thelounge.subfolder.conf.sample b/thelounge.subfolder.conf.sample index b1c048a5b..a3b663db9 100644 --- a/thelounge.subfolder.conf.sample +++ b/thelounge.subfolder.conf.sample @@ -15,6 +15,9 @@ location ^~ /thelounge/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app thelounge; + set $upstream_port 9000; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + rewrite /thelounge(.*) $1 break; - proxy_pass http://$upstream_app:9000; } diff --git a/transmission.subdomain.conf.sample b/transmission.subdomain.conf.sample index 7839550d1..54cd511fe 100644 --- a/transmission.subdomain.conf.sample +++ b/transmission.subdomain.conf.sample @@ -25,14 +25,20 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app transmission; + set $upstream_port 9091; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_pass_header X-Transmission-Session-Id; - proxy_pass http://$upstream_app:9091; } location ~ (/transmission)?/rpc { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app transmission; - proxy_pass http://$upstream_app:9091; + set $upstream_port 9091; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/transmission.subfolder.conf.sample b/transmission.subfolder.conf.sample index 1c1ab2889..468d4a057 100644 --- a/transmission.subfolder.conf.sample +++ b/transmission.subfolder.conf.sample @@ -12,13 +12,19 @@ location ^~ /transmission { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app transmission; + set $upstream_port 9091; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_pass_header X-Transmission-Session-Id; - proxy_pass http://$upstream_app:9091; } location ^~ /transmission/rpc { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app transmission; - proxy_pass http://$upstream_app:9091; + set $upstream_port 9091; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/tt-rss.subdomain.conf.sample b/tt-rss.subdomain.conf.sample index 9d6ab3666..2d8072e6c 100644 --- a/tt-rss.subdomain.conf.sample +++ b/tt-rss.subdomain.conf.sample @@ -22,10 +22,13 @@ server { # enable the next two lines for ldap auth #auth_request /auth; #error_page 401 =200 /login; - + resolver 127.0.0.11 valid=30s; set $upstream_app tt-rss; - proxy_pass http://$upstream_app:80; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_redirect http://$upstream_app:80 /; proxy_read_timeout 60s; proxy_set_header Host $host; diff --git a/ubooquity.subdomain.conf.sample b/ubooquity.subdomain.conf.sample index caf91a066..51b2a134b 100644 --- a/ubooquity.subdomain.conf.sample +++ b/ubooquity.subdomain.conf.sample @@ -21,31 +21,43 @@ server { # enable the next two lines for ldap auth #auth_request /auth; #error_page 401 =200 /login; - + include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ubooquity; - proxy_pass http://$upstream_app:2202; + set $upstream_port 2202; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location /admin { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ubooquity; - proxy_pass http://$upstream_app:2203; + set $upstream_port 2203; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location /admin-res { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ubooquity; - proxy_pass http://$upstream_app:2203; + set $upstream_port 2203; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location /admin-api { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ubooquity; - proxy_pass http://$upstream_app:2203; + set $upstream_port 2203; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } } diff --git a/ubooquity.subfolder.conf.sample b/ubooquity.subfolder.conf.sample index 84ef84e0b..fb0d76c93 100644 --- a/ubooquity.subfolder.conf.sample +++ b/ubooquity.subfolder.conf.sample @@ -12,12 +12,18 @@ include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ubooquity; - proxy_pass http://$upstream_app:2202; + set $upstream_port 2202; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location ^~ /ubooquity/admin { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app ubooquity; - proxy_pass http://$upstream_app:2203; + set $upstream_port 2203; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } diff --git a/unifi-controller.subdomain.conf.sample b/unifi-controller.subdomain.conf.sample index 18b7c4030..0ba727d33 100644 --- a/unifi-controller.subdomain.conf.sample +++ b/unifi-controller.subdomain.conf.sample @@ -25,7 +25,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app unifi-controller; - proxy_pass https://$upstream_app:8443; + set $upstream_port 8443; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } location /wss { @@ -40,7 +43,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app unifi-controller; - proxy_pass https://$upstream_app:8443; + set $upstream_port 8443; + set $upstream_proto https; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + proxy_buffering off; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; diff --git a/znc.subdomain.conf.sample b/znc.subdomain.conf.sample index 5650291b0..3ab36f529 100644 --- a/znc.subdomain.conf.sample +++ b/znc.subdomain.conf.sample @@ -25,6 +25,9 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app znc; - proxy_pass http://$upstream_app:6501; + set $upstream_port 6501; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } -} \ No newline at end of file +} diff --git a/znc.subfolder.conf.sample b/znc.subfolder.conf.sample index decf3ef5f..5c7b47b16 100644 --- a/znc.subfolder.conf.sample +++ b/znc.subfolder.conf.sample @@ -12,5 +12,8 @@ location /znc { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app znc; - proxy_pass http://$upstream_app:6501; -} \ No newline at end of file + set $upstream_port 6501; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + +}