File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1-
1+ # Traefik_v1 example config
2+ # -------------------------
23# Use this example for the proxy document server running at 'backendserver-address'
34# into the virtual directory 'documentserver-virtual-path'.
45# Replace {{TRAEFIK_HOST}} with a name or an ip of the traefik server
6+ #
7+ # Tested with DocumentServer (separate server) + Traefik_v1 (separate server) + onlyoffice/docs-example (separate server)
58
69defaultEntryPoints = [" http" ]
710[entryPoints ]
@@ -21,7 +24,7 @@ defaultEntryPoints = ["http"]
2124 passHostHeader = true
2225
2326 [frontends .docservice .headers .customrequestheaders ]
24- X-Forwarded-Host = " {{TRAEFIK_HOST}}/documentserver-virtual-path "
27+ X-Forwarded-Host = " {{TRAEFIK_HOST}}"
2528
2629 [frontends .docservice .routes .vpath ]
27- rule = " PathPrefixStrip:/documentserver-virtual-path/"
30+ rule = " Host:{{TRAEFIK_HOST}}; PathPrefixStrip:/documentserver-virtual-path/"
Original file line number Diff line number Diff line change 1+ # Traefik_v2/v3 example config
2+ # -------------------------
3+ # Use this example for the proxy document server running at 'backendserver-address'
4+ # into the virtual directory 'documentserver-virtual-path'.
5+ # Replace {{TRAEFIK_HOST}} with a name or an ip of the traefik server
6+ #
7+ # Tested with DocumentServer (separate server) + Traefik_v2/v3 (separate server) + onlyoffice/docs-example (separate server)
8+
9+ http :
10+ routers :
11+ ds :
12+ rule : Host(`{{TRAEFIK_HOST}}`) && PathPrefix(`/documentserver-virtual-path`)
13+ service : ds
14+ middlewares :
15+ - strip-vpath
16+ - fix-location
17+
18+ services :
19+ ds :
20+ loadBalancer :
21+ servers :
22+ - url : " http://backendserver-address"
23+
24+ middlewares :
25+ strip-vpath :
26+ stripPrefix :
27+ prefixes :
28+ - " /documentserver-virtual-path"
29+
30+ fix-location :
31+ plugin :
32+ rewriteResponseHeaders :
33+ rewrites :
34+ - header : " Location"
35+ regex : " ^/(.*)$"
36+ replacement : " /documentserver-virtual-path/$1"
You can’t perform that action at this time.
0 commit comments