Skip to content

Commit

Permalink
Add Treafik HTTP/3 Support (#3965)
Browse files Browse the repository at this point in the history
Signed-off-by: wuast94 <[email protected]>
Signed-off-by: wuast94 <[email protected]>
Signed-off-by: Simon L. <[email protected]>
Signed-off-by: Marc <[email protected]>
Co-authored-by: wuast94 <[email protected]>
Co-authored-by: Simon L <[email protected]>
  • Loading branch information
3 people authored Jan 14, 2024
1 parent cf54794 commit 72fe749
Showing 1 changed file with 51 additions and 45 deletions.
96 changes: 51 additions & 45 deletions reverse-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,61 +556,67 @@ The examples below define the dynamic configuration in YAML files. If you rather
# STATIC CONFIGURATION

entryPoints:
https:
address: ":443" # Create an entrypoint called "https" that uses port 443
https:
address: ":443" # Create an entrypoint called "https" that uses port 443
# If you want to enable HTTP/3 support, uncomment the line below
# http3: {}

certificatesResolvers:
# Define "letsencrypt" certificate resolver
letsencrypt:
acme:
storage: /letsencrypt/acme.json # Defines the path where certificates should be stored
email: <your-email-address> # Where LE sends notification about certificates expiring
tlschallenge: true
# Define "letsencrypt" certificate resolver
letsencrypt:
acme:
storage: /letsencrypt/acme.json # Defines the path where certificates should be stored
email: <your-email-address> # Where LE sends notification about certificates expiring
tlschallenge: true

providers:
file:
directory: "/path/to/dynamic/conf" # Adjust the path according your needs.
watch: true
file:
directory: "/path/to/dynamic/conf" # Adjust the path according your needs.
watch: true

# Enable HTTP/3 feature by uncommenting the lines below. Don't forget to route 443 UDP to Traefik (Firewall\NAT\Traefik Container)
# experimental:
# http3: true
```

1. Declare the router, service and middlewares for Nextcloud in `/path/to/dynamic/conf/nextcloud.yml`:

```yml
http:
routers:
nextcloud:
rule: "Host(`<your-nc-domain>`)"
entrypoints:
- "https"
service: nextcloud
middlewares:
- nextcloud-chain
tls:
certresolver: "letsencrypt"

services:
nextcloud:
loadBalancer:
servers:
- url: "http://localhost:11000" # Use the host's IP address if Traefik runs outside the host network

middlewares:
nextcloud-secure-headers:
headers:
hostsProxyHeaders:
- "X-Forwarded-Host"
referrerPolicy: "same-origin"

https-redirect:
redirectscheme:
scheme: https
nextcloud-chain:
chain:
middlewares:
# - ... (e.g. rate limiting middleware)
- https-redirect
- nextcloud-secure-headers
routers:
nextcloud:
rule: "Host(`<your-nc-domain>`)"
entrypoints:
- "https"
service: nextcloud
middlewares:
- nextcloud-chain
tls:
certresolver: "letsencrypt"

services:
nextcloud:
loadBalancer:
servers:
- url: "http://localhost:11000" # Use the host's IP address if Traefik runs outside the host network

middlewares:
nextcloud-secure-headers:
headers:
hostsProxyHeaders:
- "X-Forwarded-Host"
referrerPolicy: "same-origin"

https-redirect:
redirectscheme:
scheme: https

nextcloud-chain:
chain:
middlewares:
# - ... (e.g. rate limiting middleware)
- https-redirect
- nextcloud-secure-headers
```
---
Expand Down

0 comments on commit 72fe749

Please sign in to comment.