From 77f43f04127b6582434543e4817a9e91cd73d043 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Sun, 10 Mar 2019 21:57:55 +0100 Subject: [PATCH] Add service discovery to reverse proxy doc --- .../reverse_proxy_configuration.rst | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/admin_manual/configuration_server/reverse_proxy_configuration.rst b/admin_manual/configuration_server/reverse_proxy_configuration.rst index 8f36724fc11..ed44b563267 100644 --- a/admin_manual/configuration_server/reverse_proxy_configuration.rst +++ b/admin_manual/configuration_server/reverse_proxy_configuration.rst @@ -44,6 +44,32 @@ or webroot you can use the **overwrite** parameters inside the :file:`config/con Leave the value empty or omit the parameter to keep the automatic detection. +Service Discovery +----------------- + +The redirects for CalDAV or CardDAV does not work if Nextcloud is running behind a +reverse proxy. The recommended solution is that your reverse proxy does the redirects. + +Apache2 +^^^^^^^ +:: + + RewriteEngine On + RewriteRule ^/\.well-known/carddav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L] + RewriteRule ^/\.well-known/caldav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L] + +Thanks to `@ffried `_ for apache2 example. + +Traefik +^^^^^^^ +:: + + traefik.frontend.redirect.permanent: 'true' + traefik.frontend.redirect.regex: https://(.*)/.well-known/(card|cal)dav + traefik.frontend.redirect.replacement: https://$$1/remote.php/dav/ + +Thanks to `@pauvos `_ for traefik example. + Example -------