mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-01 06:50:00 +00:00
[docs] Annotate split-domain setup (#2372)
This adds account-domain and host comments next to each config line to hopefully make it easier for folks to understand what goes where.
This commit is contained in:
parent
42d8011ff4
commit
1f962372af
1 changed files with 11 additions and 11 deletions
|
@ -71,18 +71,18 @@ In order to configure the redirect, you'll need to configure it on the account d
|
||||||
|
|
||||||
```nginx
|
```nginx
|
||||||
server {
|
server {
|
||||||
server_name example.org;
|
server_name example.org; # account-domain
|
||||||
|
|
||||||
location /.well-known/webfinger {
|
location /.well-known/webfinger {
|
||||||
rewrite ^.*$ https://social.example.org/.well-known/webfinger permanent;
|
rewrite ^.*$ https://social.example.org/.well-known/webfinger permanent; # host
|
||||||
}
|
}
|
||||||
|
|
||||||
location /.well-known/host-meta {
|
location /.well-known/host-meta {
|
||||||
rewrite ^.*$ https://social.example.org/.well-known/host-meta permanent;
|
rewrite ^.*$ https://social.example.org/.well-known/host-meta permanent; # host
|
||||||
}
|
}
|
||||||
|
|
||||||
location /.well-known/nodeinfo {
|
location /.well-known/nodeinfo {
|
||||||
rewrite ^.*$ https://social.example.org/.well-known/nodeinfo permanent;
|
rewrite ^.*$ https://social.example.org/.well-known/nodeinfo permanent; # host
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -96,10 +96,10 @@ myservice:
|
||||||
image: foo
|
image: foo
|
||||||
# Other stuff
|
# Other stuff
|
||||||
labels:
|
labels:
|
||||||
- 'traefik.http.routers.myservice.rule=Host(`example.org`)'
|
- 'traefik.http.routers.myservice.rule=Host(`example.org`)' # account-domain
|
||||||
- 'traefik.http.middlewares.myservice-gts.redirectregex.permanent=true'
|
- 'traefik.http.middlewares.myservice-gts.redirectregex.permanent=true'
|
||||||
- 'traefik.http.middlewares.myservice-gts.redirectregex.regex=^https://(.*)/.well-known/(webfinger|nodeinfo|host-meta)$$'
|
- 'traefik.http.middlewares.myservice-gts.redirectregex.regex=^https://(.*)/.well-known/(webfinger|nodeinfo|host-meta)$$' # host
|
||||||
- 'traefik.http.middlewares.myservice-gts.redirectregex.replacement=https://social.$${1}/.well-known/$${2}'
|
- 'traefik.http.middlewares.myservice-gts.redirectregex.replacement=https://social.$${1}/.well-known/$${2}' # host
|
||||||
- 'traefik.http.routers.myservice.middlewares=myservice-gts@docker'
|
- 'traefik.http.routers.myservice.middlewares=myservice-gts@docker'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -108,10 +108,10 @@ myservice:
|
||||||
Ensure that the redirect is configured on the account domain in your `Caddyfile`. The following example assumes the account domain as `example.com`, and host domain as `social.example.com`.
|
Ensure that the redirect is configured on the account domain in your `Caddyfile`. The following example assumes the account domain as `example.com`, and host domain as `social.example.com`.
|
||||||
|
|
||||||
```
|
```
|
||||||
example.com {
|
example.com { # account-domain
|
||||||
redir /.well-known/host-meta* https://social.example.com{uri} permanent
|
redir /.well-known/host-meta* https://social.example.com{uri} permanent # host
|
||||||
redir /.well-known/webfinger* https://social.example.com{uri} permanent
|
redir /.well-known/webfinger* https://social.example.com{uri} permanent # host
|
||||||
redir /.well-known/nodeinfo* https://social.example.com{uri} permanent
|
redir /.well-known/nodeinfo* https://social.example.com{uri} permanent # host
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue