Your web server is not properly set up to resolve `.well-known` URLs, failed on: `/.well-known/caldav`

Hello,

after updating Nextcloud to version 29 I get the error-message:
Your web server is not properly set up to resolve .well-known URLs, failed on: /.well-known/caldav

I searched for this error allready. I found that the .htaccess has to be changed. I did that with the result that my nextcloud wasn’t reachable anymore. Only a restore of a backup got me back to business.

What is the right way to solve this issue?

Required Information

  • DietPi version
    G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=4
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘not applicable’

  • Distro version
    bookworm

  • Kernel version
    Linux DietPi 6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03) x86_64 GNU/Linux

  • Architecture
    amd64

  • SBC model
    Native PC (x86_64)

I have a similar problem but nextcloud 29 works (with webfinger, not caldav).

ping @MichaIng I know you are using NC as well. Maybe you can have a look.

I recognised this as well since NC29, when doing an update yesterday. Something seems to have broken with this check: [Bug]: NC29 .well-known URLs, failed on: /.well-known/caldav · Issue #45033 · nextcloud/server · GitHub

Which webserver are you using?

EDIT: Okay, known bug, a fix has been basically found and will likely be merged with next Nextcloud update. There is also a webserver config change required currently, but probably the check can be relaxed, as I guess it is stricter than the Nextcloud handler itself.

2 Likes

Hi,

I am using Apache as webserver.

as stated by @MichaIng

You need to wait on Nextcloud developer to fix this issue on their next release

I had the same problem after updating to 29. In my case, what worked was editing /etc/apache2/conf-enabled/dietpi-dav_redirect.conf and adding a " / " at the end of those two lines.
So from this:

Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav

To This:

Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav/
Redirect 301 /.well-known/caldav  /nextcloud/remote.php/dav/

Not sure if after Nextcloud sends the next update it will have to be removed (I don’t know the why it is needed now or if it is needed going forward) but for now it removes the warning for me.

2 Likes

@MichaIng something we would need to consider as well?

Thanks for posting this solution.

Where do I make these changes if I am using Lighttpd instead of apache?

Many thanks. This solved the problem at my nextcloud as well.

Also, where to do it in nginx?

Sorry I don’t know, I still have not worked out how to fix this in Lighttpd either. Maybe someone with more knowledge about this issue can help us.

For lighttpd you find the config files in /etc/lighttpd/conf-available/.
It should be in 99-dietpi-dav_redirect.conf or 99-dietpi-nextcloud.conf.

Thanks, I modified the file /etc/lighttpd/conf-available/99-dietpi-dav_redirect.conf to:

Redirect Cal/CardDAV requests to Nextcloud endpoint:

url.redirect += (
“^/.well-known/caldav” => “/nextcloud/remote.php/dav/”,
“^/.well-known/carddav” => “/nextcloud/remote.php/dav/”
)

After restarting all services though nextcloud is still reporting a problem:

Your web server is not properly set up to resolve .well-known URLs, failed on: /.well-known/caldav For more details see the documentation :arrow_upper_right:.

Interesting, the fix for caldav is working on my system (I use also lighttpd), but not for /.well-known/webfinger :sweat_smile: :thinking:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.