diff options
author | 2023-01-30 01:47:03 -0800 | |
---|---|---|
committer | 2023-01-30 10:47:03 +0100 | |
commit | dc766f9e6fe5b7abffd95fc190adc29918759c7c (patch) | |
tree | b68b24b334b1601023374dd93bfad30b2213bc5b /docs/installation_guide | |
parent | [chore]: Bump github.com/go-playground/validator/v10 (#1400) (diff) | |
download | gotosocial-dc766f9e6fe5b7abffd95fc190adc29918759c7c.tar.xz |
[docs] Add an example on how to setup redirect with Traefik (#1395)
Diffstat (limited to 'docs/installation_guide')
-rw-r--r-- | docs/installation_guide/advanced.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/installation_guide/advanced.md b/docs/installation_guide/advanced.md index 4d11f7926..baec605c4 100644 --- a/docs/installation_guide/advanced.md +++ b/docs/installation_guide/advanced.md @@ -82,6 +82,20 @@ http { The above configuration [rewrites](https://www.nginx.com/blog/creating-nginx-rewrite-rules/) queries to `example.org/.well-known/webfinger` and `example.org/.well-known/nodeinfo` to their `fedi.example.org` counterparts, which means that query information is preserved, making it easier to follow the redirect. +If `example.org` is running on [Traefik](https://doc.traefik.io/traefik/), we could use labels similar to the following to setup the redirect. + +```docker + myservice: + image: foo + # Other stuff + labels: + - 'traefik.http.routers.myservice.rule=Host(`example.org`)' + - 'traefik.http.middlewares.myservice-gts.redirectregex.permanent=true' + - 'traefik.http.middlewares.myservice-gts.redirectregex.regex=^https://(.*)/.well-known/(webfinger|nodeinfo)$$' + - 'traefik.http.middlewares.myservice-gts.redirectregex.replacement=https://fedi.$${1}/.well-known/$${2}' + - 'traefik.http.routers.myservice.middlewares=myservice-gts@docker' +``` + ### Step 3: What now? Once you've done steps 1 and 2, proceed as normal with the rest of your GoToSocial installation. |