Unable to correctly configure CalDAV CardDAV

Unable to correctly configure CalDAV CardDAV
I have the following Security and Setup warnings in the administration overview of my Nextcloud.

web server is not properly set up to resolve “/.well-known/caldav” and
web server is not properly set up to resolve "/.well-known/carddav

I have looked at the Service Discovery portion of the documentation and it references Apache and Nginx. I am able to access my Nextcloud from the iOS and Android Nextcloud client apps. The version of Nextcloud I have is 20.7, PHP Version is 7.2.25 and MySQL version is 5.7.31.

I have added

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

to the .htaccess file in my root directory replacing nextcloud with the location of the sub-directory of my nextcloud and the error messages still persists.

My Nextcloud is running on a shared hosting service so I do not have access to system files and directories, such as the apache directory. I have reviewed over 50 entries referencing caldav and carddav and everything that I saw recommended making changes to apache.

I’m a relative beginner in installing and configuring things on my website. If anyone has any help what so ever please dumb it down for this beginner. Any help is greatly appreciated. TIA

Hello JT,

If you are using NGINX with your NC. Follow steps bellow:

  1. Login to NGINX
  2. go to Proxy Host setting for your NC
  3. Edit it and go to Advances Settings
  4. add the lines below, making sure your add your correct NC domain

location = /.well-known/carddav {
return 301 https://YOUR_NC_DOMAIN/remote.php/dav;
}

location = /.well-known/caldav {
    return 301 https://YOUR_NC_DOMAIN/remote.php/dav;
}

According to the information that is available to me from my shared hosting provider I am using Apache. I have very limited access to anything more than my domain files. To be exact I can only access my MySQL and phpAdmin only through Webpage forms. I have no other capabilities or access. I do appreciate what you are attempting to provide me. Thanks again.