Error 405 Method not allowed while sync with mobile App

Nextcloud version (eg, 20.0.5): 20.0
Operating system and version (eg, Ubuntu 20.04): Debian 10 (Raspberry)
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 7.4): dont know

Is this the first time you’ve seen this error? (Y/):

Hello,

I used folderSync App mon my smartphone
I get an error “405 Method Not Allowed” who seems to came from server config.
The connection test of the app to my nextcloud is OK.
Nextcloud official app works fine

I tried a2enmod allowmethods. The mod is actived.
I add these 2 lines

<Location "/">
        AllowMethods GET PUT PROPFIND
</Location>

in apache2.conf file withous success.

When I look the apache access log, it seems that windows client e.g is using these methods without problems
I don’t really know how to fix this error since I’m noob.

Thank you for your help

I use foldersync because i wan’t files to delete files that have been suppressed from the source on the server.

The output of your my apache error:

[Fri May 07 18:51:36.197819 2021] [mpm_prefork:notice] [pid 7306] AH00163: Apache/2.4.38 (Raspbian) OpenSSL/1.1.1d configured -- resuming normal operations
[Fri May 07 18:51:36.198619 2021] [core:notice] [pid 7306] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 07 18:51:51.903048 2021] [access_compat:error] [pid 7313] [client 192.168.1.75:11022] AH01797: client denied by server configuration: /var/www/html/nextcloud/config
[Fri May 07 19:06:22.848267 2021] [access_compat:error] [pid 8152] [client 192.168.1.75:11249] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata

Note that this is the IP of my PC (not my smarphone) on wich the sync works fine
The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocovrf5db6ww',
  'passwordsalt' => 'SlydOKTlzHqgyTetflcjz3rylYxyAM',
  'secret' => 'mkJP2Fn6y+sCdIievNZEGTcN77YurCKlx/4V3g4CHzrq96Zx',
  'trusted_domains' => 
  array (
    0 => '192.168.1.82',
    1=>'192.168.1.13',
    2=>'192.168.1.254',
    3=>'mycloud.ddns.net'
  ),
   'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '20.0.0.9',
  'overwrite.cli.url' => 'http://192.168.1.82/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'ppwd',
  'installed' => true,
  'maintenance' => false
);

The output of my mycloud.conf.`:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName mycloud.ddns.net
    DocumentRoot /var/www/html/nextcloud
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =mycloud.ddns.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>