diff --git a/nextcloud.subdomain.conf.sample b/nextcloud.subdomain.conf.sample index c1c846a0c..e41e6a272 100644 --- a/nextcloud.subdomain.conf.sample +++ b/nextcloud.subdomain.conf.sample @@ -1,4 +1,4 @@ -## Version 2021/05/18 +## Version 2022/05/10 # make sure that your dns has a cname set for nextcloud # assuming this container is called "swag", edit your nextcloud container's config # located at /config/www/nextcloud/config/config.php and add the following lines before the ");": @@ -33,4 +33,14 @@ server { proxy_max_temp_file_size 2048m; } + + # The rules in this block are an adaptation of the rules + # in the Nextcloud `.htaccess` that concern `/.well-known`. + location ^/.well-known/(caldav|carddav) { + return 301 $scheme://$host/remote.php/dav; + } + + # Let Nextcloud's API for `/.well-known` URIs handle these + # requests by passing them to the front-end controller. + rewrite ^/.well-known/(webfinger|nodeinfo) /index.php$uri redirect; }