Nginx jail NC21 plugin "/.well-known/caldav" install error Truenas admin panel

Security & setup warnings

There are some warnings regarding your setup.

  • 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.
  • MySQL version “5.7.33-log” is used. Nextcloud 21 will no longer support this version and requires MySQL 8 or higher.

================
Tried to fix using the code below in nginx.conf

# The following rule is only needed for the Social app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/webfinger /public.php?service=webfinger last;

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;
}

=============== but still getting the error======
using nginx reverse proxy in a jail with ssl and these errors keeps showing in the overview admin panel. If someone knows how to fix this or assist. I have also tried just typing the { return 301 https://domain.com/remote.php/dav; } this did not work either.

Hi userjm,

try adding the following to your NGINX config:

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;
}

Yes did try before posting as per above post { return 301 https://domain.com/remote.php/dav; } it doesn’t stop messages using the spelt out https://nextcloud.domain.com

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

I have my nextcloud 21 installed using the plugin jail straight runs fine (12.1 Release). I have the nginx reverse proxy in another jail (12.2 Release) with letsencryt SSL one ip setup forwading request for several site one of which is nextcloud via local ip address. Site as domain names eg : https://nextcloud.domain.com ; office.domain.com & plex.domain.com. I also tried using $scheme:$host instead of the url and still get messages. I must be the unusual case.

Strange thing is if I go to https://nextcloud.domain.com/remote.php/dav/ I get a message

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

so it must be working so why I am I getting the error messages. I am missing something. Could this be a bug!

Solution for my server below:

    # This fixed the error messages in admin panel do service php-fpm restart after mod
    location /.well-known {       
        location = /.well-known/carddav   { return 301 /remote.php/dav/; }
        location = /.well-known/caldav    { return 301 /remote.php/dav/; }
        
        # according to the documentation these two lines are not necessary, but version 21.0.0 will produce warnings in the overview setup check
        rewrite ^/.well-known/webfinger /index.php$uri redirect;
        rewrite ^/.well-known/nodeinfo /index.php$uri redirect;
        location = /.well-known/webfinger   { return 301 /index.php$uri; }
        location = /.well-known/nodeinfo   { return 301 /index.php$uri; }
        
        # anything else is dynamically handled by Nextcloud
        location ^~ /.well-known          { return 301 /index.php$uri; }

        try_files $uri $uri/ =404;
    }