Problem with CarDAV and CalDAV [RESOLVED]

Good afternoonn

I’ve install nextcloud on my RaspberryPi with Apache and PHP…
I’ve choose my hard disk on USB like default directory data…

The only problem I met is this last:

Il y a quelques avertissements concernant votre configuration.

  • La configuration du serveur web ne permet pas d’atteindre “/.well-known/caldav”. Vous trouverez plus d’informations dans la documentation.
  • La configuration du serveur web ne permet pas d’atteindre “/.well-known/carddav”. Vous trouverez plus d’informations dans la documentation.

(I use it in French)

I need to resolve it to add my calendar on Google Agenda or Outlook …

I’ve try to do this:

nextcloud.occ (it’s an alias of sudo -u www-data php occ) maintenance:update:htaccess, to have an new htaccess file, but the problem persists…

If you need any other information, please ask me and I will answer the more quickly !

Thank you for your help !

Someone can help me !
I’m waiting …

Have you installed nextcloud-snap?

No… I’ve make an manual installation, not be snap… the “nextcloud.occ” it’s an alias… (https://www.computerhope.com/unix/ualias.htm) it’s to make an command more shorter or different…

I see. Just wanted to be sure, because nextcloud-snap comes with an included cli-utility nexrcloud.occ.

Are you running Nextcloud in a subfolder (e.g. https://www.example.com/nextcloud ) or in webroot (https://www.example.com)?

I see. Just wanted to be sure, because nextcloud-snap comes with an included cli-utility nexrcloud.occ.

I know, it’s because the first time I’ve use nextcloud, it was by snap (by habit, I’ve keep the command) :sweat_smile:

Webroot ?

My nextcloud folder is in /var/www/nextcloud but I’ve create an apache file specially for nextcloud …
I’ve just to enter in my browser my DNS without the path !

Here is my Apache file:

Thanks for your help :grin:

Apache file for nextcloud

<VirtualHost *:80>

DocumentRoot /var/www/nextcloud
ServerName cloud.doussis.be

</VirtualHost>

Is mod_rewrite enabled?

Your Apache file differs a bit from the one in the official documentation. Can you adjust your apache vhost file for nextcloud according to the documentation: https://docs.nextcloud.com/server/17/admin_manual/installation/source_installation.html#apache-web-server-configuration

Can you post the content of your .htaccess file located at https://cloud.doussis.be ?

The problem has been resolved when I’ve add:

<Directory "/var/www/nextcloud/">
    Require all granted
    AllowOverride All
    Options FollowSymLinks MultiViews

    <IfModule mod_dav.c>
      Dav off
    </IfModule>

  </Directory>

Into my apache config files, thanks you Bernie_O for your help :slight_smile:

The correct syntax is:

HTTP Standard Apache Config

    <VirtualHost *:80>

    DocumentRoot /var/www/nextcloud
    ServerName cloud.doussis.be

    <Directory "/var/www/nextcloud/">
        Require all granted
        AllowOverride All
        Options FollowSymLinks MultiViews

        <IfModule mod_dav.c>
          Dav off
        </IfModule>

      </Directory>

    RewriteEngine on
    RewriteCond %{SERVER_NAME} =cloud.doussis.be
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
    </VirtualHost> 

HTTPS Apache Config

    <IfModule mod_ssl.c>
    <VirtualHost *:443>

    DocumentRoot /var/www/nextcloud
    ServerName cloud.doussis.be

    <Directory "/var/www/nextcloud/">
        Require all granted
        AllowOverride All
        Options FollowSymLinks MultiViews

        <IfModule mod_dav.c>
          Dav off
        </IfModule>

      </Directory>

    <IfModule mod_headers.c>
    	Header always set Strict-Transport-Security "max-age=15552000"
    </IfModule>

    SSLCertificateFile /etc/letsencrypt/live/cloud.doussis.be/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/cloud.doussis.be/privkey.pem
    Include /etc/letsencrypt/options-ssl-apache.conf
    </VirtualHost>
    </IfModule>
2 Likes