Repository navigation
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
With NC28 I had no well-known URL errors, and no change to the NGINX configuration. After upgrading to NC29, I now have the following message:
Your web server is not properly set up to resolve .well-known URLs, failed on: /.well-known/caldav For more details see the [documentation ↗](https://docs.nextcloud.com/server/29/go.php?to=admin-setup-well-known-URL).
In the NGINX logs, I see a 401 errors:
192.168.9.6 - - [25/Apr/2024:13:02:21 +0000] "PROPFIND /.well-known/caldav HTTP/1.1" 301 162 "-" "Nextcloud Server Crawler"
192.168.9.6 - - [25/Apr/2024:13:02:21 +0000] "GET /remote.php/dav HTTP/1.1" 401 569 "-" "Nextcloud Server Crawler"
192.168.9.6 - - [25/Apr/2024:13:02:21 +0000] "GET /.well-known/caldav HTTP/1.1" 301 162 "-" "Nextcloud Server Crawler"
192.168.9.6 - - [25/Apr/2024:13:02:21 +0000] "GET /remote.php/dav HTTP/1.1" 401 569 "-" "Nextcloud Server Crawler"
My Android DAVx5 client doesn't seem to have any issues and continues to work well.
A curl test, shows the 301 redirect working, followed by a 401, but I'm assume that's expected with an unauthenticated request
curl -IL https://nextcloud.mydomain.com/.well-known/caldav
HTTP/2 301
server: nginx/1.25.4
date: Thu, 25 Apr 2024 13:12:51 GMT
content-type: text/html
content-length: 162
location: https://nextcloud.mydomain.com/remote.php/dav
referrer-policy: no-referrer
x-content-type-options: nosniff
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-robots-tag: noindex, nofollow
x-xss-protection: 1; mode=block
strict-transport-security: max-age=15768000; includeSubDomains; preload;
HTTP/2 401
server: nginx/1.25.4
date: Thu, 25 Apr 2024 13:12:51 GMT
content-type: application/xml; charset=utf-8
set-cookie: oc_sessionPassphrase=NoBfvCYLv%2B7Hzw7eRoiL4VWZNyADXzcx2k5fgbu4FerYYBJjgl%2Fq8xLrTWscFxu3ithDlInkdabcfGg0nbL0wrG3B%2BPRkOCYjtibS4QvsluoWlkgrT5DdSWiQGUwHxi9; path=/; secure; HttpOnly; SameSite=Lax
set-cookie: __Host-nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
set-cookie: __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
set-cookie: oc2a3d1f7bcc=6eadda8dbfe0995012c16997240ee6b0; path=/; secure; HttpOnly; SameSite=Lax
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache
content-security-policy: default-src 'none';
www-authenticate: Basic realm="MyDomain, charset="UTF-8"
referrer-policy: no-referrer
x-content-type-options: nosniff
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-robots-tag: noindex, nofollow
x-xss-protection: 1; mode=block
strict-transport-security: max-age=15768000; includeSubDomains; preload;
There is an error in Nextcloud.log that appears relevant:
"File": "/usr/share/nginx/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php",
"Line": 152,
"message": "No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured"
Steps to reproduce
- Upgrade from NC28 to NC29
- well-known message in admin settings
Expected behavior
No well-known errors
Installation method
Community Manual installation with Archive
Nextcloud Server version
29
Operating system
Other
PHP engine version
PHP 8.2
Web server
Nginx
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 22 to 23)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"nextcloud.mydomain.com",
"nextcloud"
],
"apps_paths": [
{
"path": "\/usr\/share\/nginx\/html\/nextcloud\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/usr\/share\/nginx\/html\/nextcloud\/custom-apps",
"url": "\/custom-apps",
"writable": true
}
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "29.0.0.19",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"forwarded_for_headers": [
"HTTP_X_FORWARDED_FOR",
"HTTP_X_FORWARDED",
"HTTP_FORWARDED_FOR"
],
"overwriteprotocol": "https",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"installed": true,
"mail_smtpmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"loglevel": 0,
"maintenance": false,
"enable_previews": true,
"secret": "***REMOVED SENSITIVE VALUE***",
"filesystem_check_changes": 0,
"filelocking.enabled": "true",
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"timeout": 1.5,
"read_timeout": 1.5,
"dbindex": 0
},
"trashbin_retention_obligation": "auto",
"overwrite.cli.url": "https:\/\/nextcloud.mydomain.com",
"mail_smtpauthtype": "LOGIN",
"mail_smtpsecure": "ssl",
"theme": "",
"app_install_overwrite": [
"joplin"
],
"encryption.legacy_format_support": false,
"encryption.key_storage_migrated": false,
"default_language": "en",
"default_phone_region": "CA",
"maintenance_window_start": 1,
"memories.db.triggers.fcu": true,
"memories.exiftool": "\/usr\/share\/nginx\/html\/nextcloud\/custom-apps\/memories\/bin-ext\/exiftool-amd64-glibc",
"memories.vod.path": "\/usr\/share\/nginx\/html\/nextcloud\/custom-apps\/memories\/bin-ext\/go-vod-amd64",
"memories.gis_type": 2,
"enabledPreviewProviders": [
"OC\\Preview\\Image",
"OC\\Preview\\HEIC",
"OC\\Preview\\Movie",
"OC\\Preview\\TIFF"
]
}
}List of activated Apps
No response
Nextcloud Signing status
No errors have been found.Nextcloud Logs
{
"reqId": "6jDGw0WbOAAarIrEpjXS",
"level": 0,
"time": "2024-04-25T13:21:06+00:00",
"remoteAddr": "192.168.9.6",
"user": "--",
"app": "webdav",
"method": "GET",
"url": "/remote.php/dav",
"message": "No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured",
"userAgent": "Nextcloud Server Crawler",
"version": "29.0.0.19",
"exception": {
"Exception": "Sabre\\DAV\\Exception\\NotAuthenticated",
"Message": "No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured",
"Code": 0,
"Trace": [
{
"file": "/usr/share/nginx/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "beforeMethod",
"class": "Sabre\\DAV\\Auth\\Plugin",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/usr/share/nginx/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 456,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"beforeMethod:GET",
[
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
]
},
{
"file": "/usr/share/nginx/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 253,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/usr/share/nginx/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 321,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/usr/share/nginx/html/nextcloud/apps/dav/lib/Server.php",
"line": 374,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/usr/share/nginx/html/nextcloud/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/usr/share/nginx/html/nextcloud/remote.php",
"line": 172,
"args": [
"/usr/share/nginx/html/nextcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/usr/share/nginx/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php",
"Line": 152,
"message": "No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured",
"exception": {},
"CustomMessage": "No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured"
}
}Additional info
No response
Activity
meldarionqeusse commentedon Apr 25, 2024
I have the same problem and noticed my
.htaccessfile was changed with the update are you also getting a warning that.htaccessis not working?cvandesande commentedon Apr 25, 2024
@meldarionqeusse I have the
.htaccessfile but as I'm using NGINX for the web server I think NGINX ignores it?I think the well-known URLs are working. I created a new app password and passed the credentials with curl, the redirect works and I get a valid response. So I think the well-known redirects are working, but something has gone wrong with the test in admin settings and no authentication is passed.
H5N1v2 commentedon Apr 25, 2024
ne20002 commentedon Apr 25, 2024
kesselb commentedon Apr 25, 2024
Starting with 29 the check is done via php and no longer by your browser. We are using the overwrite.cli.url for it.
Here is the code: https://github.com/nextcloud/server/blob/master/apps/settings/lib/SetupChecks/WellKnownUrls.php
To debug it further please check the redirect on the server with curl and use the overwrite url.
cvandesande commentedon Apr 25, 2024
@kesselb overwrite URL is the public facing domain
It's the same URL I used in my successful curl test should it be something different?
GrahamTolhurst commentedon Apr 25, 2024
I'm getting the same problem after upgrading to NC29.0.0. The error must be inaccurately reported as both my calendar and contacts are redirecting properly and syncing to my mobile device.
A bit of testing:
./nextcloud/apps/settings/lib/SetupChecks/WellKnownUrls.php has the following lines of code:
With the above lines of code enabled, Nextcloud reports a "/.well-known/caldav" error.
If I comment out the carddav line, Nextcloud reports the same caldav error.
But if I comment out the caldav line and uncomment the carddav line, Nextcloud now reports a carddav error.
It's looking like it's reporting the last test as an error even though it's not.
If I comment out both lines, there's no error reported.
(NC29.0.0 with Apache2, behind Reverse Proxy (Nginx) Server)
akn01 commentedon Apr 25, 2024
Same problem here. I use
'overwrite.cli.url' => 'https://nextcloud.mydomain.com',andcurl -L -u validuser:validpassword https://nextcloud.mydomain.com/.well-known/caldavoutputs the WebDAV message of the interface correctly.grogg commentedon Apr 26, 2024
Same problem after upgrade to Nextcloud 29.0.0 on Apache2. The install documentation has the redirects set to "301" in .htaccess and the error occurs even though the redirects have been verified as functioning properly. Changing the .htaccess redirects from "301" to "207" has resolved the errors on my end.
kesselb commentedon Apr 26, 2024
Does the redirect still work? ;)
We are looking into the problem and if you are certain that the redirects are okay, then please ignore the setup check for now. Please don't change the response code to 207, that's just wrong.
kesselb commentedon Apr 26, 2024
@cvandesande
The setup check expects a redirect to
/remote.php/dav/.1Your redirect goes to
/remote.php/davwithout a trailing slash.Please double-check your configuration if the redirects are configured with a trailing slash.2
Footnotes
https://github.com/nextcloud/server/blob/10af08736e9094dd3f7240ec517cea9a0061d5b4/apps/settings/lib/SetupChecks/WellKnownUrls.php#L84 ↩
https://github.com/nextcloud/documentation/blob/master/admin_manual/installation/nginx-root.conf.sample#L124-L125 ↩
KopfKrieg commentedon Apr 26, 2024
Seems like the documentation isn't really clear about that :/
For apache, there are no trailing slashes mentioned: https://docs.nextcloud.com/server/latest/admin_manual/issues/general_troubleshooting.html#service-discovery-label
Also, for reverse proxies there are some with, some without trailing slashes: https://docs.nextcloud.com/server/29/admin_manual/configuration_server/reverse_proxy_configuration.html#service-discovery
(Also, my Gnome Online Account [Fedora 40, Gnome 46] still doesn't work after adding trailing slashes, DAVx5 works fine though, and the error in the web ui is also gone)
97 remaining items
martinjgrunwald commentedon Oct 11, 2024
I still have this issue with 30.0.0. Did I misconfigure something or will it be fixed in 30.0.1?
kesselb commentedon Oct 11, 2024
Sorry, that was a typo.
It's 30.0.1.
andrewheeler82 commentedon Oct 11, 2024
💪💪💪💪💪💪💪💪
BlasterM5 commentedon Dec 8, 2024
This fixed it for me as well. Ubuntu 24.04, nginx, php-8.3, NC 29 / 30
Adding the / at the end of the overwrite.cli.url
bigretromike commentedon Jan 13, 2025
It would be great for new admins that documentation to update documentation about slash at end of dav in all reverse proxy example codes.
MichaIng commentedon Jan 14, 2025
@bigretromike
The slash is not needed anymore: #46079
As from the logic, it would even lead to a doubled slash, the docs should actually all be reverted in this regards. However, webservers are clever enough to not choke on that.
oliver4bsb commentedon Feb 11, 2025
yup greetings. in 2025 the bug it is still there - i think .
apparently the link works fine because i get This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client. however in the admin panel i still get the warning message
"Your web server is not properly set up to resolve .well-known URLs, failed on: /.well-known/webfinger "
and if i try opening https://myserver/index.php/.well-known/webfinger i get an internal server error. not big deal tho because apparently all works fine now. this warning appeared after i stalled a few new apps. i will try disable all and see where is the issue. cheers.
come-nc commentedon Feb 11, 2025
What is the bug?
If your webfinger endpoint returns an internal server error, it is expected that the check will warn you about it, that is the point of this check.
If you installed a Nextcloud application which makes your webfinger endpoint crash, please report a bug to the application repository.
Sjoerd001 commentedon Feb 14, 2025
I'm running latest 30.0.5.1 and the problem still persists.
Just enter https://mysite/.well-known/webfinger without trailing slash i get an error page.
Entering with a trailing slash i got this in mij bowser and testing with curl says 'Too many redirects' and stops at 50.
https://mysite/nextcloud/.well-known/webfinger/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/html/
oliver4bsb commentedon Feb 14, 2025
Thanks for the clarification! The issue was caused by the Social app—I uninstalled it, and now everything works like a charm. As you suggested, I'll leave feedback for the app's development team so they can look into it.
Appreciate the help! Cheers.
come-nc commentedon Feb 17, 2025
Again, not the same issue, in your case the check works correctly and fails to warn you about the issue.
Fix your redirection or open an issue on the app messing with the redirection.
susnux commentedon Feb 18, 2025
If you encounter this issue, please make sure you are on the latest version.
For general discussion and configuration help please use our forums: https://help.nextcloud.com/
If you still have a similar issue, please open a new ticket here on GitHub as it is very likely unrelated to this one.
Also developers will not check discussions of old closed issues, so new issues should be reported as such.