1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-26 19:27:23 +01:00

Updated nginx redirects to reflect a change (? old change maybe) in DAV urls. Added TXT record for *davs._tcp to give path to Card/CalDAV.

This commit is contained in:
Steve Hay
2022-09-18 13:42:26 -04:00
parent 8be9842605
commit 178a485831
2 changed files with 17 additions and 6 deletions

View File

@@ -63,16 +63,24 @@
internal;
alias /;
}
location ~ ^/((caldav|carddav|webdav).*)$ {
location ~ ^/(dav|caldav|carddav)(.*)$ {
# Z-Push doesn't like getting a redirect, and a plain rewrite didn't work either.
# Properly proxying like this seems to work fine.
proxy_pass https://127.0.0.1/cloud/remote.php/$1;
proxy_pass https://127.0.0.1/cloud/remote.php/dav$2;
}
location ~ ^/(webdav)(.*)$ {
# Z-Push doesn't like getting a redirect, and a plain rewrite didn't work either.
# Properly proxying like this seems to work fine.
proxy_pass https://127.0.0.1/cloud/remote.php/webdav$2;
}
rewrite ^/.well-known/host-meta /cloud/public.php?service=host-meta last;
rewrite ^/.well-known/host-meta.json /cloud/public.php?service=host-meta-json last;
rewrite ^/.well-known/carddav /cloud/remote.php/carddav/ redirect;
rewrite ^/.well-known/caldav /cloud/remote.php/caldav/ redirect;
rewrite ^/.well-known/webfinger /cloud/index.php/.well-known/webfinger redirect;
rewrite ^/.well-known/nodeinfo /cloud/index.php/.well-known/nodeinfo redirect;
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html#nginx
rewrite ^/.well-known/carddav /cloud/remote.php/dav/ redirect;
rewrite ^/.well-known/caldav /cloud/remote.php/dav/ redirect;
rewrite ^/.well-known/webfinger /cloud/index.php/.well-known/webfinger redirect;
rewrite ^/.well-known/nodeinfo /cloud/index.php/.well-known/nodeinfo redirect;
# ADDITIONAL DIRECTIVES HERE