Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: After update from 29 to 30, I get "Your web server is not properly set up to resolve .well-known URLs" #48232

Closed
5 of 8 tasks
marco-calautti opened this issue Sep 20, 2024 · 8 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 30-feedback bug feature: settings needs info

Comments

@marco-calautti
Copy link

marco-calautti commented Sep 20, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

After updating from NC29 to NC30 the report shows:
Your web server is not properly set up to resolve .well-known URLs, failed on: /.well-known/caldav

I tried accessing https://<myhost>/.well-known/caldav (and also carddav), and the redirect to remote.php works fine, but for some reasons NC30 is not able to verify that the redirect indeed works.

Steps to reproduce

  1. Update from NC29 to NC30
  2. Go to administration -> Report

Expected behavior

NC30 should be able to understand that the .well-known redirect works.

Nextcloud Server version

30

Operating system

None

PHP engine version

None

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 28 to 29)

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

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@marco-calautti marco-calautti added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Sep 20, 2024
@marco-calautti marco-calautti changed the title [Bug]: After update from 29 to 30, Your web server is not properly set up to resolve .well-known URLs [Bug]: After update from 29 to 30, I get "Your web server is not properly set up to resolve .well-known URLs" Sep 20, 2024
@joshtrichards
Copy link
Member

Please provide the output of curl -I -L https://<myhost>/.well-known/caldav from the command-line of your Nextcloud Server.

@marco-calautti
Copy link
Author

marco-calautti commented Sep 20, 2024

HTTP/2 401 
content-security-policy: default-src 'none';base-uri 'none';manifest-src 'self';script-src 'self';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self' data:;connect-src 'self';media-src 'self';frame-ancestors 'self';form-action 'self'
content-type: application/xml; charset=utf-8
date: Fri, 20 Sep 2024 15:27:55 GMT
referrer-policy: no-referrer
server: Apache/2.4.62 (Debian)
set-cookie: oclmolb45e6m=5c351b3807e1056eaf31c5243c9f136f; path=/; secure; HttpOnly; SameSite=Lax
set-cookie: oc_sessionPassphrase=UeE1ZVSvIp%2F0yMYIN%2FIYGiNjuNIWcYLhEVE6xfeFI%2BqfuW9wkGKkgtD%2BxJn9TBbIDBcLLEXPictwyl8faFtEoYrn%2FHJ3smoXor90uYIX45pca6pwtHUy59hWLlczUcQG; path=/; secure; HttpOnly; SameSite=Lax
set-cookie: oclmolb45e6m=5c351b3807e1056eaf31c5243c9f136f; 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: oclmolb45e6m=5c351b3807e1056eaf31c5243c9f136f; path=/; secure; HttpOnly; SameSite=Lax
strict-transport-security: max-age=31536000; preload
www-authenticate: Basic realm="Nextcloud", charset="UTF-8"
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-powered-by: PHP/8.2.23
x-robots-tag: noindex, nofollow
x-xss-protection: 1; mode=block

@joshtrichards
Copy link
Member

Is that really the full output? No redirect beforehand to /remote.php/dav/?

@marco-calautti
Copy link
Author

marco-calautti commented Oct 15, 2024

Yes, that is the full output. I tried running the command both from within the Nextcloud server command line and also from another machine, and I get the same output.

@joshtrichards
Copy link
Member

With this Traefik config?

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html#traefik-2

It sounds like you may be doing a rewrite rather than a redirect, which would explain the problem.

@marco-calautti
Copy link
Author

marco-calautti commented Oct 15, 2024

Yes, I am using a rewrite, as also suggested by the official Nextcloud's documentation you reported:

traefik.http.middlewares.nextcloud-dav.replacepathregex.regex: "^/.well-known/ca(l|rd)dav"
traefik.http.middlewares.nextcloud-dav.replacepathregex.replacement: "/remote.php/dav/"

Ah, my bad. The documentation uses a redirectregex middleware, not a replacepathregex.

@marco-calautti
Copy link
Author

After changing to a redirectregex, the warning disappeared. Thanks a lot! Very strange that with previous versions of Nextcloud, the problem did not occur.

@joshtrichards
Copy link
Member

The setup checks have evolved quite a bit through the v28-v30 development cycles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 30-feedback bug feature: settings needs info
Projects
None yet
Development

No branches or pull requests

2 participants