From e84793be28b1e8fc1c44de7984110c8793c16f75 Mon Sep 17 00:00:00 2001 From: hoellen Date: Thu, 11 Feb 2021 20:37:08 +0100 Subject: [PATCH] Update nginx config for Nextcloud --- nextcloud/rootfs/nginx/sites-enabled/nginx.conf | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/nextcloud/rootfs/nginx/sites-enabled/nginx.conf b/nextcloud/rootfs/nginx/sites-enabled/nginx.conf index 4a6bdf7..33d0d25 100644 --- a/nextcloud/rootfs/nginx/sites-enabled/nginx.conf +++ b/nextcloud/rootfs/nginx/sites-enabled/nginx.conf @@ -21,17 +21,11 @@ server { access_log off; } - rewrite ^/.well-known/host-meta /public.php?service=host-meta last; - rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last; - rewrite ^/.well-known/webfinger /public.php?service=webfinger last; + location = /.well-known/carddav { return 301 https://$host/remote.php/dav; } + location = /.well-known/caldav { return 301 https://$host/remote.php/dav; } - location = /.well-known/carddav { - return 301 https://$host/remote.php/dav; - } - - location = /.well-known/caldav { - return 301 https://$host/remote.php/dav; - } + # Anything else is dynamically handled by Nextcloud + location ^~ /.well-known { return 301 https://$host/index.php$uri; } location / { rewrite ^ /index.php;