Error posted caldav and carddav for nginx

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.

What is the solution?

Nextcloud 14.0.3
Operating system and version Ubuntu 18.04
nginx 1.14
PHP version 7.2

Hi
you must setup 2 location directives for carddav and caldav on your server directive for nextcloud
see the example nginx configuration.
Regards.

After googling around adding this to the nginx config fixed the issue for me. I am also running NC 20

location = /.well-known/carddav {
  return 301 $scheme://$host:$server_port/remote.php/dav;
}
location = /.well-known/caldav {
  return 301 $scheme://$host:$server_port/remote.php/dav;
}