[RESOLVED] My web server is not properly set up to resolve "/.well-known/caldav" and "/.well-known/carddav"

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 27.0.1
Operating system and version (eg, Ubuntu 20.04): Debian 12
Apache or nginx version (eg, Apache 2.4.25): 2.4.57
PHP version (eg, 7.4): 8.2

The issue you are facing: My web server is not properly set up to resolve "/.well-known/caldav" and "/.well-known/carddav"

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Upgraded from Debian 11 to 12 (including PHP from 7.4 to 8.2)
  2. Upgraded from Nextcloud 25.0.8 to 26.0.3 to 27.0.0 to 27.0.1
  3. Created /var/www/html/.htaccess below according documentation linked at bottom
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteRule ^\.well-known/carddav /nextcloud/remote.php/dav/ [R=301,L]
  RewriteRule ^\.well-known/caldav /nextcloud/remote.php/dav/ [R=301,L]
</IfModule>

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the documentation ↗.
Your web server is not properly set up to resolve "/.well-known/carddav". Further information can be found in the documentation ↗.

Hi Christian,

your issue sounds familiar to me :slight_smile:
I’m on OpenSUSE Leap, now 15.5, but for a long while I’ve this lines in my Apache VHOST definition for my nextcloud instance:

# Rules in .htaccess are NOT triggered, whyever. So added manually
        Redirect 301 /.well-known/carddav /remote.php/dav
        Redirect 301 /.well-known/caldav /remote.php/dav

Works fine for me, never tested again if still neccesary.

Hi Michaelof,

Thanks for your fast reply; I added the last three lines to the VirtualHost in /etc/apache2/sites-available/default-ssl.conf (Nextcloud is hosted on https://.../nextcloud/)

<VirtualHost>
        ...
        RewriteEngine On
        Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
        Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav
</VirtualHost>

Issue resolved.

Kind regards, Christian