ServerName nextcloud.example.com DocumentRoot /var/lib/nextcloud/webroot Alias /dist-apps /usr/lib/nextcloud/nextcloud-apps Require all granted AllowOverride All Options FollowSymLinks MultiViews Require all granted AllowOverride All Options FollowSymLinks MultiViews Dav off RewriteEngine on RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L] RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L] RewriteRule ^\.well-known/webfinger /public.php?service=webfinger [QSA,L] RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L] RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]