Format files

This commit is contained in:
Eric Nemchik 2023-02-12 20:51:33 -06:00
parent e4b70cea1d
commit 0eb569982b
16 changed files with 52 additions and 51 deletions

@ -11,3 +11,4 @@ trim_trailing_whitespace = false
[{*.conf,*.conf.sample}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

@ -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

@ -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;

@ -41,6 +41,6 @@ server {
set $upstream_port 8080;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}

@ -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;
}

@ -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/;
}

@ -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;

@ -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.

@ -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;
}
}

@ -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;

@ -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;
}
}

@ -52,5 +52,5 @@ server {
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}
}

@ -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 {

@ -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 {

@ -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;

@ -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;