From 2c4ba5f4a80e317e318c9938886520869e146a91 Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 4 May 2022 18:04:20 +0200 Subject: [PATCH] add Treafik 2 to reverse proxy documentation Signed-off-by: szaimen --- reverse-proxy.md | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index bd78b835..b3b31632 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -4,7 +4,7 @@ Basically, you need to specify the port that the apache container shall use and All examples below will use port `11000` as example apache port. Also it is supposed that the reverse proxy runs on the same server like AIO, hence `localhost` is used and not an internal ip-address to point to the AIO instance. Modify both to your needings. -**Info:** The instructions below assume that your reverse proxy is installed directly on the host, not inside a separate docker container. If you want to run the reverse proxy inside a docker container, you can do so by using the `--network host` option when starting the reverse proxy container. +**Info:** The instructions below assume that your reverse proxy is installed directly on the host, not inside a separate docker container. If you want to run the reverse proxy inside a docker container, you can do so by using the `--network host` option when starting the reverse proxy container. Or if you don't want to use the networks host option, substituting `localhost` by the internal ip-address of the Host might work. ### Reverse proxy config examples @@ -13,7 +13,7 @@ All examples below will use port `11000` as example apache port. Also it is supp
click here to expand -
+ Add this to your Caddyfile: ``` @@ -32,7 +32,6 @@ Of course you need to modify `` to the domain on which you want
click here to expand -
**Disclaimer:** the config below is not working 100% correctly, yet. See e.g. https://github.com/nextcloud/all-in-one/issues/450, https://github.com/nextcloud/all-in-one/issues/447 and https://github.com/nextcloud/all-in-one/issues/491. Improvements to it are very welcome! @@ -56,6 +55,38 @@ Of course SSL needs to be set up as well e.g. by using certbot and your domain m
+#### Traefik 2 + +
+ +click here to expand + +**Disclaimer:** It might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome! + +Add a `nc.toml` to the treafik rules folder with the following content: + +```toml +[http.routers] + [http.routers.nc-rtr] + entryPoints = ["https"] + rule = "Host()" + service = "nc-svc" + middlewares = ["chain-no-auth"] + [http.routers.nc-rtr.tls] + certresolver = "le" + +[http.services] + [http.services.nc-svc] + [http.services.nc-svc.loadBalancer] + passHostHeader = true + [[http.services.nc-svc.loadBalancer.servers]] + url = "http://localhost:11000" +``` + +Of course you need to modify `` to the domain on which you want to run Nextcloud. + +
+ ### Startup command After adjusting your reverse proxy config, use the following command to start AIO: