From 2838c938f88bed9611d4784dad4b7efb4ce50df2 Mon Sep 17 00:00:00 2001 From: chbmb Date: Wed, 29 May 2019 00:27:28 +0100 Subject: [PATCH] Update readme Just because I'm playing around with CodiMD and figured I'd make this pretty. Checked that having a `.md` file amidst all the proxy confs doesn't cause any issues in our LetsEncrypt image. --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ _readme | 36 ------------------------------------ 2 files changed, 48 insertions(+), 36 deletions(-) create mode 100644 README.md delete mode 100644 _readme diff --git a/README.md b/README.md new file mode 100644 index 0000000..044b938 --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +![](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_small.png) + +# 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. + +They are grouped in two: + +1. `subfolder` these will allow accessing services at https://yourdomain.com/servicename +2. `subdomain` these will allow accessing services at https://servicename.yourdomain.com + +## To enable the reverse proxy configs: + +### Configure your default site config + +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;` + +### Ensure you have a custom docker network + +These confs assume that the letsencrypt 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 LetsEncrypt 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 letsencrypt container + +### Make any necessary changes detailed in the config + +Some applications require you to make changes to the service containers such as adding base urls in their settings. Each conf file lists the required changes on the first line. + +If you are reverse proxying linuxserver containers installed on the same host with the recommended options, you shouldn't need to edit these conf files. + +## To disable the configs: + +Simply rename the files to add back the `.sample` to the end, and restart letsencrypt. diff --git a/_readme b/_readme deleted file mode 100644 index 1f234c9..0000000 --- a/_readme +++ /dev/null @@ -1,36 +0,0 @@ -This folder contains sample reverse proxy configs for various docker images linuxserver provides. They are grouped in two: -1. "subfolder" these will allow accessing services at https://yourdomain.com/servicename -2. "subdomain" these will allow accessing services at https://servicename.yourdomain.com - -To enable the reverse proxies: -1) rename the conf files and remove the ".sample" at the end (ie. "sonarr.subfolder.conf") and -2) restart the letsencrypt container - -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;" - -To disable the configs, simply rename the files to add back the ".sample" to the end, and restart letsencrypt. - -If you are reverse proxying linuxserver containers installed on the same host with the recommended options, you shouldn't -need to edit these conf files. However, some files require you to make changes to the service containers such as adding -base urls in their settings. Each conf file lists the required changes on the first line. - -These confs also assume that the letsencrypt 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. You don't have to do anything extra. -- If you are starting the containers via command line, first create a bridge network via "docker network create [networkname]" -and 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, do one of the following: - 1) Unraid 6.5.0 or earlier - (under advanced) add "--network=[networkname]" into "Extra Parameters". - 2) Unraid 6.5.1 or later - in the network type dropdown, select "Custom : [networkname]". - You would have to do the above for the letsencrypt container as well, so they are all on the same custom network. 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.