Running nextcloud:14.0.3 @ https://cloud.domain.tld/ (with Traefik as a reverse proxy in front)
From Settings->Administration->Overview
There are some warnings regarding your setup.
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.
The documentation can be found here.
Shouldn't this be working by default? The .htaccess file already contains these settings
I experienced the same warning, but everything seems to work as expected. (I also use traefik as reverse proxy).
I found an issue in the server repo that seems related: https://github.com/nextcloud/server/issues/11850
Might be something with the schema, because if I curl .well-known/carddav it gives me http and not https.
➜ ~ curl -i https://DOMAIN/.well-known/caldav
HTTP/2 301
content-type: text/html; charset=iso-8859-1
date: Wed, 31 Oct 2018 10:12:25 GMT
location: http://DOMAIN/remote.php/dav/
referrer-policy: strict-origin
server: Apache/2.4.25 (Debian)
strict-transport-security: max-age=31536000; includeSubdomains; preload
content-length: 325
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://DOMAIN/remote.php/dav/">here</a>.</p>
<hr>
<address>Apache/2.4.25 (Debian) Server at DOMAIN Port 80</address>
</body></html>
Will investigate further...
So this eliminates the warning:
Changing the .htaccess file to
...
RewriteRule ^\.well-known/carddav https://DOMAIN/remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav https://DOMAIN/remote.php/dav/ [R=301,L]
...
But this is no solution for this image, since we are using the stock .htaccess file. :thinking:
Another Traefik user here..
I similarly changed:
RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
To:
RewriteRule ^\.well-known/carddav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
And now service discovery works on my iOS devices :)
D
This could be fixed with #527
Real fix in #644
To fix this issue traefik should be configured for the service discovery. In the nexcloud 16 documentation a fix is given.
add the following labels to the nextcloud container:
traefik.frontend.redirect.permanent: 'true'
traefik.frontend.redirect.regex: https://(.*)/.well-known/(card|cal)dav
traefik.frontend.redirect.replacement: https://$$1/remote.php/dav/
Thanks @SnowMB for point that out, this resolved it for me.
Feel free to close
Most helpful comment
Another Traefik user here..
I similarly changed:
To:
And now service discovery works on my iOS devices :)
D