NC 23.0.0 ā€“ Your web server is not properly set up to resolve

After installing NC 23, I am not able to get rid of these four warnings:

Your web server is not properly set up to resolve "/.well-known/webfinger".
Your web server is not properly set up to resolve "/.well-known/nodeinfo".
Your web server is not properly set up to resolve "/.well-known/caldav".
Your web server is not properly set up to resolve "/.well-known/carddav".

I know this issue has been discussed elsewhere, but I really wonder whether there might be a bug in the automatic checks.

My setup is the following. I am running Apache2 on Ubuntu and my nextcloud files sit in /var/www/nc/. I have set an Alias as described in Apache Web server configuration such that nextcloud is reachable on my server via https://mydomain.com/nc. Basically, everything seems to work fine, except for the above-mentioned warnings.

In the file /var/www/nc/.htaccess I have modified/placed these lines:

RewriteRule ^\.well-known/carddav /nc/remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav /nc/remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/webfinger /nc/index.php/.well-known/webfinger [R=301,L]
RewriteRule ^\.well-known/nodeinfo /nc/index.php/.well-known/nodeinfo [R=301,L]

In order to test the settings, I run wget https://mydomain.com/nc/.well-known/carddav on an other computer. This produces a 401 Unauthorized error. When I change the RewriteRule path to something else, e.g. /remote.php/dav/, I get the error ERROR 404: Not Found. So I think that the resolving actually works fine.

Going forward, I have got three questions:

  1. Is it possible that the automatic checks in NC23 are faulty?
  2. I did modify lines in /var/www/nc/.htaccess although there is a warning #### DO NOT CHANGE ANYTHING ABOVE THIS LINE #### saying I should not do that. But where else could/should I have modified the RewriteRules?
  3. If the automatic checks in NC23 are actually correct, does anyone see a way to rectify these warnings?

Thanks so much for your help!

Have you read this?

Read also this. Sorry german.

Thanks for the hints! I had actually read the first reference, but it did not help.

The second one might have worked. However, I decided to try it differently.

For anyone who might run into the same issue and is at liberty to change the server setup: It seems to be much easier to access nextcloud via a virtual host for a subdomain. Everything worked right out of the box.

On different server, I actually faced the same problem. It seems to always occur when the nextcloud folder is not the webroot folder.

What helped me was putting the following code into the virtual host configuration:

RewriteEngine on
RewriteRule ^/\.well-known/carddav /nc/remote.php/dav [R=301,L]
RewriteRule ^/\.well-known/caldav /nc/remote.php/dav [R=301,L]
RewriteRule ^/\.well-known/webfinger /nc/index.php/.well-known/webfinger [R=301,L]
RewriteRule ^/\.well-known/nodeinfo /nc/index.php/.well-known/nodeinfo [R=301,L]

The difference with respect to General troubleshooting > Service discovery is that I placed a slash after every caret in the RewriteRules.

I have the same warnings and apparently nothing i do fixes them. My .htaccess looks like below

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{HTTP_USER_AGENT} DavClnt
  RewriteRule ^$ /remote.php/webdav/ [L,R=302]
  RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

  RewriteRule ^/\.well-known/carddav /nextcloud/remote.php/dav/ [R=301,L]
  RewriteRule ^/\.well-known/caldav /nextcloud/remote.php/dav/ [R=301,L]
  RewriteRule ^/\.well-known/webfinger /nextcloud/index.php/.well-known/webfinger [R=301,L]
  RewriteRule ^/\.well-known/nodeinfo /nextcloud/index.php/.well-known/nodeinfo [R=301,L]

  RewriteRule ^remote/(.*) remote.php [QSA,L]
  RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
  RewriteRule ^\.well-known/(?!acme-challenge|pki-validation) /index.php [QSA,L]
  RewriteRule ^(?:\.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R=404,L]
</IfModule>

Iā€™m a bit lost, you guys have any idea?