Skip to content

Commit

Permalink
Format files
Browse files Browse the repository at this point in the history
  • Loading branch information
nemchik committed Feb 13, 2023
1 parent e4b70ce commit 0eb5699
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 51 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ trim_trailing_whitespace = false
[{*.conf,*.conf.sample}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -23,27 +23,27 @@ 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.

- If you are starting the containers via command line, first create a bridge network with the command `docker network create [networkname]` Then define that network in the container run/create command via `--network [networkname]`.

- 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

Expand Down
8 changes: 4 additions & 4 deletions calibre-web.subdomain.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crowdsec.subdomain.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ server {
set $upstream_port 8080;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}
}
16 changes: 8 additions & 8 deletions komga.subfolder.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions mailu.subfolder.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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/;
}

Expand All @@ -32,7 +32,7 @@ location ^~ /admin/ {

}

location /webmail{
location /webmail {
return 301 $scheme://$host/webmail/;
}

Expand Down
1 change: 0 additions & 1 deletion mytinytodo.subfolder.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion nextcloud.subfolder.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions ombi.subdomain.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}
}
2 changes: 1 addition & 1 deletion qbittorrent.subdomain.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 8 additions & 8 deletions rclone.subfolder.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion sonarr.subdomain.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ server {
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

}
}
}
2 changes: 1 addition & 1 deletion transmission.subdomain.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion transmission.subfolder.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
19 changes: 10 additions & 9 deletions tvheadend.subfolder.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

Expand Down
2 changes: 1 addition & 1 deletion youtube-dl.subfolder.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0eb5699

Please sign in to comment.