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

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

Why don’t you share your experience?

I don’t know what you are talking about. Everything is written in this thread otherwise it would not work for me.

Can you give the details of the modifications you made on your files?
What strings you’ve changed or added?
What was the mistake for the carddav link?

1 Like

Finally I’ve found the solution.

You have to edit file .htaccess located in docker/your_nextcloud_folder.
Under <IfModule mod_rewrite.c> you have to edit just 2 strings:

RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]

It should looks like this:

RewriteRule ^\.well-known/carddav https://your_site_address/remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav https://your_site_address/remote.php/dav/ [R=301,L]

I’m not sure, but after editing you may have to restart Nextcloud container.

Sorry for my English.

3 Likes