From 0eb569982bbf025f5092050b5052df1bfdec439a Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Sun, 12 Feb 2023 20:51:33 -0600 Subject: [PATCH] Format files --- .editorconfig | 1 + README.md | 14 +++++++------- calibre-web.subdomain.conf.sample | 8 ++++---- crowdsec.subdomain.conf.sample | 2 +- komga.subfolder.conf.sample | 16 ++++++++-------- mailu.subfolder.conf.sample | 4 ++-- mytinytodo.subfolder.conf.sample | 1 - nextcloud.subfolder.conf.sample | 2 +- ombi.subdomain.conf.sample | 10 +++++----- qbittorrent.subdomain.conf.sample | 2 +- rclone.subfolder.conf.sample | 16 ++++++++-------- sonarr.subdomain.conf.sample | 2 +- transmission.subdomain.conf.sample | 2 +- transmission.subfolder.conf.sample | 2 +- tvheadend.subfolder.conf.sample | 19 ++++++++++--------- youtube-dl.subfolder.conf.sample | 2 +- 16 files changed, 52 insertions(+), 51 deletions(-) diff --git a/.editorconfig b/.editorconfig index 9d5c05a..61b6e4b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,3 +11,4 @@ trim_trailing_whitespace = false [{*.conf,*.conf.sample}] indent_style = space indent_size = 4 +trim_trailing_whitespace = true diff --git a/README.md b/README.md index 110b24c..71fd0eb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # How to use these Reverse Proxy Configs -This folder contains sample reverse proxy configs for various docker images linuxserver provides and other commonly used applications. +This folder contains sample reverse proxy configs for various docker images linuxserver provides and other commonly used applications. NOTE: We avoid providing samples that publicly expose server management software (ex: syno, qnap, unraid, proxmox, esxi, etc). Pull requests to add samples for this category of applications will not be accepted. @@ -23,12 +23,12 @@ Conversely subdomain reverse proxying does not require special accommodation by Make sure that your default site config contains the following lines in the appropriate spots as seen in the default version: -1) For subfolder methods: `include /config/nginx/proxy-confs/*.subfolder.conf;` -2) For subdomain methods: `include /config/nginx/proxy-confs/*.subdomain.conf;` +1. For subfolder methods: `include /config/nginx/proxy-confs/*.subfolder.conf;` +2. For subdomain methods: `include /config/nginx/proxy-confs/*.subdomain.conf;` ### Ensure you have a custom docker network -These confs assume that the swag container can reach other containers via their dns hostnames (defaults to container name) resolved via docker's internal dns. This is achieved through having the containers attached to the same user defined docker bridge network. +These confs assume that the swag container can reach other containers via their dns hostnames (defaults to container name) resolved via docker's internal dns. This is achieved through having the containers attached to the same user defined docker bridge network. - If you are using docker-compose and the containers are managed through the same yaml file, docker-compose will automatically create a custom network and attach all containers to it. Nothing extra is required. @@ -36,14 +36,14 @@ These confs assume that the swag container can reach other containers via their - If you are using a gui manager like portainer, you can create a custom bridge network in the gui, and select it when creating a new container. -- If you are using unraid, create a custom network in command line via `docker network create [networkname]`, then go to docker service settings (under advanced) and set the option `Preserve user defined networks:` to `Yes`. Then in each container setting, including the swag container, in the network type dropdown, select `Custom : [networkname]`. This is a necessary step as the bridge network that unraid uses by default does not allow container to container communication. +- If you are using unraid, create a custom network in command line via `docker network create [networkname]`, then go to docker service settings (under advanced) and set the option `Preserve user defined networks:` to `Yes`. Then in each container setting, including the swag container, in the network type dropdown, select `Custom : [networkname]`. This is a necessary step as the bridge network that unraid uses by default does not allow container to container communication. If the reverse proxied containers are not reachable via dns or they are running on a different machine, you will have to modify these confs to fit your needs. ### Rename the required proxy configs -1) Rename the conf files and remove the `.sample` at the end (ie. `sonarr.subfolder.conf`) -2) Restart the swag container +1. Rename the conf files and remove the `.sample` at the end (ie. `sonarr.subfolder.conf`) +2. Restart the swag container ### Make any necessary changes detailed in the config diff --git a/calibre-web.subdomain.conf.sample b/calibre-web.subdomain.conf.sample index 54b1418..e0af18a 100644 --- a/calibre-web.subdomain.conf.sample +++ b/calibre-web.subdomain.conf.sample @@ -48,10 +48,10 @@ server { proxy_set_header X-Scheme $scheme; } - # OPDS feed for eBook reader apps - # Even if you use Authelia, the OPDS feed requires a password to be set for - # the user directly in Calibre-Web, as eBook reader apps don't support - # form-based logins, only HTTP Basic auth. + # OPDS feed for eBook reader apps + # Even if you use Authelia, the OPDS feed requires a password to be set for + # the user directly in Calibre-Web, as eBook reader apps don't support + # form-based logins, only HTTP Basic auth. location /opds/ { include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; diff --git a/crowdsec.subdomain.conf.sample b/crowdsec.subdomain.conf.sample index 4274407..a93214e 100644 --- a/crowdsec.subdomain.conf.sample +++ b/crowdsec.subdomain.conf.sample @@ -41,6 +41,6 @@ server { set $upstream_port 8080; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; - + } } diff --git a/komga.subfolder.conf.sample b/komga.subfolder.conf.sample index 7e6c780..7cd97d7 100644 --- a/komga.subfolder.conf.sample +++ b/komga.subfolder.conf.sample @@ -30,11 +30,11 @@ location ^~ /komga/ { } - location ^~ /komga/api { - include /config/nginx/proxy.conf; - include /config/nginx/resolver.conf; - set $upstream_app komga; - set $upstream_port 8080; - set $upstream_proto http; - proxy_pass $upstream_proto://$upstream_app:$upstream_port; - } +location ^~ /komga/api { + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app komga; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; +} diff --git a/mailu.subfolder.conf.sample b/mailu.subfolder.conf.sample index d6c7481..5a4cfef 100644 --- a/mailu.subfolder.conf.sample +++ b/mailu.subfolder.conf.sample @@ -5,7 +5,7 @@ # This config have been tested with "TLS_FLAVOR=mail" # To avoid errors you must change in docker-compose ports: 80 and 443, more info: https://mailu.io/1.7/reverse.html -location /admin{ +location /admin { return 301 $scheme://$host/admin/; } @@ -32,7 +32,7 @@ location ^~ /admin/ { } -location /webmail{ +location /webmail { return 301 $scheme://$host/webmail/; } diff --git a/mytinytodo.subfolder.conf.sample b/mytinytodo.subfolder.conf.sample index d50b856..6a09929 100644 --- a/mytinytodo.subfolder.conf.sample +++ b/mytinytodo.subfolder.conf.sample @@ -9,7 +9,6 @@ location /todo { } location ^~ /todo/ { - # enable the next two lines for http auth #auth_basic "Restricted"; #auth_basic_user_file /config/nginx/.htpasswd; diff --git a/nextcloud.subfolder.conf.sample b/nextcloud.subfolder.conf.sample index 62fa801..11bbb75 100644 --- a/nextcloud.subfolder.conf.sample +++ b/nextcloud.subfolder.conf.sample @@ -18,7 +18,7 @@ location ^~ /.well-known { # in the Nextcloud `.htaccess` that concern `/.well-known`. location = /.well-known/carddav { return 301 /nextcloud/remote.php/dav/; } - location = /.well-known/caldav { return 301 /nextcloud/remote.php/dav/; } + location = /.well-known/caldav { return 301 /nextcloud/remote.php/dav/; } # Let Nextcloud's API for `/.well-known` URIs handle all other # requests by passing them to the front-end controller. diff --git a/ombi.subdomain.conf.sample b/ombi.subdomain.conf.sample index ce90802..ac9b40f 100644 --- a/ombi.subdomain.conf.sample +++ b/ombi.subdomain.conf.sample @@ -53,7 +53,7 @@ server { set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; - } + } # This allows access to the documentation for the api location ~ (/ombi)?/swagger { @@ -64,9 +64,9 @@ server { set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; - } + } - if ($http_referer ~* /ombi) { - rewrite ^/swagger/(.*) /ombi/swagger/$1? redirect; - } + if ($http_referer ~* /ombi) { + rewrite ^/swagger/(.*) /ombi/swagger/$1? redirect; + } } diff --git a/qbittorrent.subdomain.conf.sample b/qbittorrent.subdomain.conf.sample index ff580c0..520d041 100644 --- a/qbittorrent.subdomain.conf.sample +++ b/qbittorrent.subdomain.conf.sample @@ -121,7 +121,7 @@ server { proxy_set_header Host $upstream_app:$upstream_port; proxy_set_header X-Forwarded-Host $host; } - + location ~ (/qbittorrent)?/scripts { include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; diff --git a/rclone.subfolder.conf.sample b/rclone.subfolder.conf.sample index 8f22cd6..ce1bacc 100644 --- a/rclone.subfolder.conf.sample +++ b/rclone.subfolder.conf.sample @@ -30,13 +30,13 @@ location ^~ /rclone/ { rewrite /rclone(.*) $1 break; } - location ^~ /rclone/websockify { - include /config/nginx/proxy.conf; - include /config/nginx/resolver.conf; - set $upstream_app rclone; - set $upstream_port 5800; - set $upstream_proto http; - proxy_pass $upstream_proto://$upstream_app:$upstream_port/websockify/; +location ^~ /rclone/websockify { + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app rclone; + set $upstream_port 5800; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port/websockify/; rewrite /rclone(.*) $1 break; - } +} diff --git a/sonarr.subdomain.conf.sample b/sonarr.subdomain.conf.sample index 44ac17e..05b1f61 100644 --- a/sonarr.subdomain.conf.sample +++ b/sonarr.subdomain.conf.sample @@ -52,5 +52,5 @@ server { set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; - } + } } diff --git a/transmission.subdomain.conf.sample b/transmission.subdomain.conf.sample index f8b0542..7324235 100644 --- a/transmission.subdomain.conf.sample +++ b/transmission.subdomain.conf.sample @@ -51,7 +51,7 @@ server { set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; - proxy_pass_header X-Transmission-Session-Id; + proxy_pass_header X-Transmission-Session-Id; } location ~ (/transmission)?/rpc { diff --git a/transmission.subfolder.conf.sample b/transmission.subfolder.conf.sample index 868e9a5..059eb32 100644 --- a/transmission.subfolder.conf.sample +++ b/transmission.subfolder.conf.sample @@ -33,7 +33,7 @@ location ^~ /transmission { set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; - proxy_pass_header X-Transmission-Session-Id; + proxy_pass_header X-Transmission-Session-Id; } location ^~ /transmission/rpc { diff --git a/tvheadend.subfolder.conf.sample b/tvheadend.subfolder.conf.sample index 644ecbe..3b76946 100644 --- a/tvheadend.subfolder.conf.sample +++ b/tvheadend.subfolder.conf.sample @@ -2,17 +2,17 @@ # make sure that your tvheadend container is named tvheadend # make sure that tvheadend is set to work with the base url /tvheadend/ # Before activating this config you need to do two things: -# - enable a setting in the tvheadend web interface -# - change your RUN_OPTS for tvheadend. +# - enable a setting in the tvheadend web interface +# - change your RUN_OPTS for tvheadend. # # You need to enable the setting "PROXY protocol & X-Forwarded For" -# in the tvheadend web interface. This setting can be found in -# "Configuration" -> "General" -> "Base" in the "HTTP Server Settings" Group. -# You need to set the View level to Expert to see it. Once activated, you may need to -# restart your tvheadend container. When testing this config, please be reminded -# that the tvheadend docker can take a very long time to start (>10mins). -# -# For the subfolder to work you also need to edit your tvheadend docker compose / cli config +# in the tvheadend web interface. This setting can be found in +# "Configuration" -> "General" -> "Base" in the "HTTP Server Settings" Group. +# You need to set the View level to Expert to see it. Once activated, you may need to +# restart your tvheadend container. When testing this config, please be reminded +# that the tvheadend docker can take a very long time to start (>10mins). +# +# For the subfolder to work you also need to edit your tvheadend docker compose / cli config # and set http_root in RUN_OPTS to tvheadend, e.g. in docker compose: # - RUN_OPTS= --http_root /tvheadend @@ -33,6 +33,7 @@ location /tvheadend/ { # enable for Authentik (requires authentik-server.conf in the server block) #include /config/nginx/authentik-location.conf; + include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; diff --git a/youtube-dl.subfolder.conf.sample b/youtube-dl.subfolder.conf.sample index 4c28675..b07a58f 100644 --- a/youtube-dl.subfolder.conf.sample +++ b/youtube-dl.subfolder.conf.sample @@ -23,7 +23,7 @@ location ^~ /youtube-dl/ { include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; - set $upstream_app youtube-dl-server; + set $upstream_app youtube-dl-server; set $upstream_port 8080; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port;