Webserver "/.well-known/caldav" - Synology Docker Nextcloud Nginx CalDav/CardDav

Hi,
I’m lost and need some help to fixe the "Ihr Webserver ist nicht richtig konfiguriert um “/.well-known/caldav” aufzulösen. " problem

I installed nextcloud on my Synology NAS with Docker and when I log in to nextcloud, go to settings, I see that my Webserver is not configured propperly “/.well-known/caldav” and same thing for CardDav.

I think that my webserver is nginx and not apache. The webserver is not in docker.

So now I got some trouble understanding what file I have to edit. And my mixed up is, because my setup runs on Docker and not as in the manual on /var/www/, or is this the same as /docker/nextcloud ? Waht is my root if my instalation is in docker/nextcloud?

If I enter the direkt link https://namexyz.synology.me:PORT/remote.php/dav , I get the response “This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client.”

So I asume I have to insert this link https://namexyz.synology.me:PORT/remote.php/dav somwhere either in the .access or in the config.php. Is this correct?

I would like to get rid of this message in the Settings Overview.

Thanks for the help

the config file of your web server.

    location = /.well-known/carddav {
      return 301 $scheme://$host:$server_port/remote.php/dav;
    }
    location = /.well-known/caldav {
      return 301 $scheme://$host:$server_port/remote.php/dav;
    }

e.g.: NGINX configuration — Nextcloud latest Administration Manual latest documentation

the config file is somewhere in /etc/nginx

but i’m not sure where to find it on a synology.

ok thanks, I found nginx.conf in /etc/nginx, I asume this is the right file?

I can put he content in the manual under the last line in my config file right? EVen if some other lines are exacly the same .

I need to change some lines:
server_name this would be the nextcloud adresse with port https://namexyz.synology.me:PORT

root , what is my nextcloud root if my instalation lies in docker/nextcloud? is it /etc/nginx/? even if there is no nextcloud folder there?

For the ssl key and certificate, I found them in the nginx.conf file so I can copy paste it. correct?

Thanks for the help.

Hello,
Usually, the right file is in /etc/nginx/sites-available.
Do ls /etc/nginx/sites-availableplease, and display the result.

I don’t have site-available instead I have site-enabled

In a properly installation, nginx conf is in sites-available. Doesnt matter. Display nginx.conf please
Your nextcloud site is accessible right ?
Is there sth in sites-enabled?

I don’t know how to copy the content from the config file in vi. Sorry :frowning:

Yes I can login with chrome into nextcloud. If I try to log in with my new fairphone3 /e/OS it is not possible. It also gives me a caldav and carddav error.

in sites-enabled there is just one file calendar-nginx.conf

You need to find the right config file. I dont think that nginx.conf is the right because you dont need to change server_name or root directives if your site works.
Your right config contains the following lines :
server_name yourdomain ;
root pathToYourNc;
where pathToyourNc is the right path (/var/www/nextcloud or /var/www for ex).
This file exists because your NC site is accessible.

If your installation use Docker, so I dont think that Nginx is your http server. Nextcloud docker contains apache server. Look at this :
https://hub.docker.com/_/nextcloud/

Ah, so because it is in the docker it is not connected to the rest of my nas. (sorry I try to simplify the terms :wink: )

I looked inside the docker an saw this, so I imagine it is really working on apache an not nginx.

My Instalation is in Docker/nextcloud folder, but I think that the nextcloud folde is the root folder of the webserver.

and inside the config folder


So what config do I need to change and how?

and inside the config.php

<?php $CONFIG = array ( 'htaccess.RewriteBase' => '/', 'memcache.local' => '\\OC\\Memcache\\APCu', 'apps_paths' => array ( 0 => array ( 'path' => '/var/www/html/apps', 'url' => '/apps', 'writable' => false, ), 1 => array ( 'path' => '/var/www/html/custom_apps', 'url' => '/custom_apps', 'writable' => true, ), ), 'instanceid' => 'oc22swys51ev', 'passwordsalt' => 'KCfCx34tPgAOPuZKXZ6I3rURt2vGBR', 'secret' => 'gyeJ0XZ33rZnVy4SchcOwwtoZJRDoC/hnx6iUnCOVKHT9Wit', 'trusted_domains' => array ( 0 => 'mydomain:PORT', ), 'datadirectory' => '/var/www/html/data', 'dbtype' => 'mysql', 'version' => '19.0.0.12', 'overwrite.cli.url' => 'http://mydomain:PORT', 'dbname' => 'nextcloud', 'dbhost' => '192.168.xxx.xxx:3306', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'USER', 'dbpassword' => 'PW', 'installed' => true, 'ldapIgnoreNamingRules' => false, 'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory', ); Sorry for the bad formating of this code.

Your last screen suggest that your config is in /etc/apache2/sites-available

this is “only” the config from the php app that we call nextcloud. but this has nothing to do with the web serverconfig you are looking for.

would you mind to run a ls -la in docker/nextcloud because there should be a .htaccess with the following line.

https://github.com/nextcloud/server/blob/8325ab4bf05494f8c54d226784a55c0988e30f88/.htaccess#L68

If I navigate to usr/local/etc/apache22 I only see the folder site-enabled. I’m again at the wrong palce, or?

Reiner_Nippes is right, you can edit a .htacess in your nextcloud directory. Sorry to not think about that, I have nginx and there is not .htacess in nginx.

Here

Yes it’s the right .htacess file config

Ok I did some changes in the htaccess but I still get the message that my webserver is not configured properly.

To be honest I don’t know if I modified the .htaccesse properly.

my domain is, https://mydomain:PORT

how do I post my .htaccess content? The format is strange

Oh yes, I managed to get rid of these error but only for caldav. The carddav is still not working.
I’m not realy sure why but I will finde out soon, hopfeully.

Thanks for the help!!

Everything works fine, now. I made a mistake for the carddav link.

Hi Snowest,
Can you give the detaisl of the modifications you made on your files?
Thanks

1 Like