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.
I have an issue to make CalDAV or CardDAV clients working properly as it described here - https://docs.nextcloud.com/server/latest/admin_manual/issues/general_troubleshooting.html#service-discovery
As you understand - proxy does not understands where to send traffic addressed to URL’s
because NO server name given in URI. However CalDAV or CardDAV apps expects to get a proper response from there and returns an error.