My NextCloud installation is a bit non-standard - we have a HAProxy gateway which grabs the first word form the supplied URI, resolves it to internal DNS name and sends traffic to it - i.e. http request to https://cloud.domain.com/cloudbug/ will be send to internal HTTP server named cloudbug.internal.domain.tld, which has location called /cloudbug/ where NextCloud app resides. Path is preserved by NextCloud settings - so user always sees URL https://cloud.domain.com/cloudbug/ in his/her browser. This part works fine and I have NO issues with it.
Nextcloud installed on internal cloudbug server will respond. We plan to have hundreds of similar backend servers behind HAproxy.
So, when I try a mobile CalDAV/CardDAV app connect to NextCloud URL https://cloud.domain.com/cloudbug/ - app expects to get a proper CalDAVCardDAV response from https://cloud.domain.com/.well-known/carddav BUT - HAproxy have NO idea where to dispatch this URL. In other words all my NextCloud servers shares the same domain name, but responds at different URI’s.