mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-01-09 07:07:34 +08:00
Merge pull request #564 from nextcloud/enh/543/traefik
add Treafik 2 to reverse proxy documentation
This commit is contained in:
commit
ae36756476
1 changed files with 34 additions and 3 deletions
|
@ -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
|
|||
<details>
|
||||
|
||||
<summary>click here to expand</summary>
|
||||
<br>
|
||||
|
||||
Add this to your Caddyfile:
|
||||
|
||||
```
|
||||
|
@ -32,7 +32,6 @@ Of course you need to modify `<your-nc-domain>` to the domain on which you want
|
|||
<details>
|
||||
|
||||
<summary>click here to expand</summary>
|
||||
<br>
|
||||
|
||||
**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
|
|||
|
||||
</details>
|
||||
|
||||
#### Traefik 2
|
||||
|
||||
<details>
|
||||
|
||||
<summary>click here to expand</summary>
|
||||
|
||||
**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(<your-nc-domain>)"
|
||||
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 `<your-nc-domain>` to the domain on which you want to run Nextcloud.
|
||||
|
||||
</details>
|
||||
|
||||
### Startup command
|
||||
|
||||
After adjusting your reverse proxy config, use the following command to start AIO:
|
||||
|
|
Loading…
Reference in a new issue