You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reverse-proxy.md
+83Lines changed: 83 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -745,6 +745,89 @@ The examples below define the dynamic configuration in YAML files. If you rather
745
745
746
746
</details>
747
747
748
+
### Traefik 3
749
+
750
+
<details>
751
+
752
+
<summary>click here to expand</summary>
753
+
754
+
**Disclaimer:** it might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome!
755
+
756
+
Traefik's building blocks (router, service, middlewares) need to be defined using dynamic configuration similar to [this](https://doc.traefik.io/traefik/providers/file/#configuration-examples) official Traefik configuration example. Using **docker labels _won't work_** because of the nature of the project.
757
+
758
+
The examples below define the dynamic configuration in YAML files. If you rather prefer TOML, use a YAML to TOML converter.
759
+
760
+
1. In Traefik's static configuration define a [file provider](https://doc.traefik.io/traefik/providers/file/) for dynamic providers:
761
+
762
+
```yml
763
+
# STATIC CONFIGURATION
764
+
765
+
entryPoints:
766
+
https:
767
+
address: ":443"# Create an entrypoint called "https" that uses port 443
768
+
# If you want to enable HTTP/3 support, uncomment the line below
769
+
# http3: {}
770
+
771
+
certificatesResolvers:
772
+
# Define "letsencrypt" certificate resolver
773
+
letsencrypt:
774
+
acme:
775
+
storage: /letsencrypt/acme.json # Defines the path where certificates should be stored
776
+
email: <your-email-address> # Where LE sends notification about certificates expiring
777
+
tlschallenge: true
778
+
779
+
providers:
780
+
file:
781
+
directory: "/path/to/dynamic/conf"# Adjust the path according your needs.
782
+
watch: true
783
+
```
784
+
785
+
2. Declare the router, service and middlewares for Nextcloud in `/path/to/dynamic/conf/nextcloud.yml`:
786
+
787
+
```yml
788
+
http:
789
+
routers:
790
+
nextcloud:
791
+
rule: "Host(`<your-nc-domain>`)"
792
+
entrypoints:
793
+
- "https"
794
+
service: nextcloud
795
+
middlewares:
796
+
- nextcloud-chain
797
+
tls:
798
+
certresolver: "letsencrypt"
799
+
800
+
services:
801
+
nextcloud:
802
+
loadBalancer:
803
+
servers:
804
+
- url: "http://localhost:11000"# Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below
805
+
806
+
middlewares:
807
+
nextcloud-secure-headers:
808
+
headers:
809
+
hostsProxyHeaders:
810
+
- "X-Forwarded-Host"
811
+
referrerPolicy: "same-origin"
812
+
813
+
https-redirect:
814
+
redirectscheme:
815
+
scheme: https
816
+
817
+
nextcloud-chain:
818
+
chain:
819
+
middlewares:
820
+
# - ... (e.g. rate limiting middleware)
821
+
- https-redirect
822
+
- nextcloud-secure-headers
823
+
```
824
+
825
+
---
826
+
827
+
⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
0 commit comments