Project

General

Profile

Actions

"Your web server is not properly set up to resolve “well-knowncaldav”"

The error message "Your web server is not properly set up to resolve “/.well-known/caldav”" typically occurs when your CalDAV client is unable to find the necessary information it needs to connect to the CalDAV service on your Nextcloud server.

The ".well-known" directory is a special directory that allows web applications to publish information about their service endpoints. The "/.well-known/caldav" path is the URL where your CalDAV client expects to find the necessary information about the CalDAV service provided by your Nextcloud server.

In the nextcloud document it tanks about this, in Service discovery following this add the following to the .htaccess file


RewriteRule ^\.well-known/host-meta /var/www/html/nextcloud/public.php?service=host-meta [QSA,L]
RewriteRule ^\.well-known/host-meta\.json /var/www/html/nextcloud/public.php?service=host-meta-json [QSA,L]
RewriteRule ^\.well-known/webfinger /var/www/html/nextcloud/public.php?service=webfinger [QSA,L]
RewriteRule ^\.well-known/carddav /var/www/html/nextcloud/remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav /var/www/html/nextcloud/remote.php/dav/ [R=301,L]

These are Apache mod_rewrite rules that redirect incoming requests for specific well-known URLs to corresponding services in a Nextcloud instance running on a web server.
  • The first rule matches the path /.well-known/host-meta and redirects it to public.php script, passing a parameter service=host-meta along with any query string using [QSA] flag.
  • The second rule matches the path /.well-known/host-meta.json and redirects it to public.php script, passing a parameter service=host-meta-json along with any query string using [QSA] flag.
  • The third rule matches the path /.well-known/webfinger and redirects it to public.php script, passing a parameter service=webfinger along with any query string using [QSA] flag.
  • The fourth and fifth rules redirect any request for /.well-known/carddav and /.well-known/caldav respectively to remote.php/dav/ path within the Nextcloud instance, using the [R=301] flag to send a permanent redirect HTTP status code 301, indicating that the requested resource has been permanently moved to a new location, and [L] flag to indicate that no further rules should be processed after this rule.

Updated by Gareth Eaton over 1 year ago · 4 revisions