Nextcloud 26.0.x unable to resolve .well-known/*dav* links

[/details]

Nextcloud version (eg, 20.0.5): 26.0.1
Operating system and version (eg, Ubuntu 20.04): lscr.io/linuxserver/nextcloud:26.0.0 (alpine)
Apache or nginx version (eg, Apache 2.4.25): nginx 1.22.1
PHP version (eg, 7.4): 8.1.17

The issue you are facing:

I recently switched from using ingress-nginx in kubernetes to Istio, and after switching, nextcloud complains that the webserver is not setup to resolve the following:

Your web server is not properly set up to resolve "/.well-known/webfinger". Further information can be found in the documentation ↗.
Your web server is not properly set up to resolve "/.well-known/nodeinfo". Further information can be found in the documentation ↗.
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 ↗.

I tried opening one of the urls in my browser (server.url/.well-known/caldav), and it seems to work:

This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client.

My istio virtual service:


apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: nextcloud-vs
spec:
  hosts:
  - "cloud.url.com"
  gateways:
  - nextcloud-gateway
  http:
  - match:
    - uri:
        prefix: /
    route:
    - destination:
        port:
          number: 80
        host: nextcloud.default.svc.cluster.local

The relevant nginx conf (basically the default conf):

 location ^~ /.well-known {
        # The rules in this block are an adaptation of the rules
        # in `.htaccess` that concern `/.well-known`.

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

        location /.well-known/acme-challenge    { try_files $uri $uri/ =404; }
        location /.well-known/pki-validation    { try_files $uri $uri/ =404; }

        # Let Nextcloud's API for `/.well-known` URIs handle all other
        # requests by passing them to the front-end controller.
        return 301 /index.php$request_uri;
    }

Access and Error logs for nginx don’t show anything during this. Nextcloud works fine besides these warnings.

Add this in the Nginx file: location = /.well-known/webdav { return 301 /remote.php/dav/; }

Hopefully that will solve your warning.