[access_compat:error] [pid 20082:tid 1482433568] [client 10.6.0.5:50538] AH01797: client denied by server configuration: /var/www/nextcloud/config

Nextcloud version (eg, 20.0.5): 21.0.0.3
Operating system and version (eg, Ubuntu 20.04): Raspbian GNU/Linux 10
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.38
PHP version (eg, 7.4): 8.0.8

The issue you are facing:
see in the log part and i can’t look in the files while i am in the browser
Is this the first time you’ve seen this error? (Y/N): n

Steps to replicate it:

  1. Synchronizing with the browser or the windows desktop client

The output of your Nextcloud log in Admin > Logging:

[Fri Jul 23 14:30:23.548758 2021] [access_compat:error] [pid 20082:tid 1490826272] [client 10.6.0.5:50536] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Fri Jul 23 14:30:23.623562 2021] [access_compat:error] [pid 20082:tid 1482433568] [client 10.6.0.5:50538] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Fri Jul 23 15:00:09.350769 2021] [evasive20:error] [pid 19469:tid 2713154592] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:09.392000 2021] [evasive20:error] [pid 19469:tid 2536907808] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:09.433409 2021] [evasive20:error] [pid 19469:tid 2469766176] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:09.462233 2021] [evasive20:error] [pid 19469:tid 2763510816] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:09.467768 2021] [evasive20:error] [pid 19469:tid 2646012960] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:09.473788 2021] [evasive20:error] [pid 19469:tid 3460105248] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:09.478350 2021] [evasive20:error] [pid 19469:tid 2956543008] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:09.502876 2021] [evasive20:error] [pid 19469:tid 2604049440] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:09.522188 2021] [evasive20:error] [pid 19469:tid 2587264032] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:09.537326 2021] [evasive20:error] [pid 19469:tid 2948150304] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:09.549523 2021] [evasive20:error] [pid 19469:tid 2578871328] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:09.590438 2021] [evasive20:error] [pid 19469:tid 2553693216] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:12.842828 2021] [evasive20:error] [pid 19469:tid 2914579488] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:12.864105 2021] [evasive20:error] [pid 19469:tid 2956543008] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/apps/theming/img/core
[Fri Jul 23 15:00:12.882666 2021] [evasive20:error] [pid 19469:tid 2704761888] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:12.883880 2021] [evasive20:error] [pid 19469:tid 2595656736] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:12.910547 2021] [evasive20:error] [pid 19469:tid 2570478624] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/core/preview
[Fri Jul 23 15:00:14.087499 2021] [evasive20:error] [pid 19469:tid 1945965600] [client 10.6.0.5:54099] client denied by server configuration: /var/www/nextcloud/remote.php
[Fri Jul 23 15:00:17.079167 2021] [evasive20:error] [pid 19469:tid 1492759584] [client 10.6.0.5:60523] client denied by server configuration: /var/www/nextcloud/remote.php
[Fri Jul 23 15:00:19.294111 2021] [evasive20:error] [pid 19469:tid 1736148000] [client 10.6.0.5:54099] client denied by server configuration: /var/www/nextcloud/remote.php
[Fri Jul 23 15:00:19.837939 2021] [evasive20:error] [pid 19469:tid 3460105248] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/remote.php
[Fri Jul 23 15:00:19.838492 2021] [evasive20:error] [pid 19469:tid 2536907808] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/ocs/v2.php
[Fri Jul 23 15:00:23.829420 2021] [evasive20:error] [pid 19469:tid 1660613664] [client 10.6.0.5:60523] client denied by server configuration: /var/www/nextcloud/remote.php
[Fri Jul 23 15:00:24.248771 2021] [evasive20:error] [pid 19469:tid 2763510816] [client 10.6.0.5:58656] client denied by server configuration: /var/www/nextcloud/index.php
[Fri Jul 23 15:00:26.698917 2021] [evasive20:error] [pid 19469:tid 2013107232] [client 10.6.0.5:54099] client denied by server configuration: /var/www/nextcloud/remote.php
[Fri Jul 23 15:00:31.286108 2021] [evasive20:error] [pid 19469:tid 1920787488] [client 10.6.0.5:60523] client denied by server configuration: /var/www/nextcloud/remote.php
[Fri Jul 23 15:00:32.783879 2021] [evasive20:error] [pid 19469:tid 1878823968] [client 10.6.0.5:54099] client denied by server configuration: /var/www/nextcloud/ocs/v1.php
[Fri Jul 23 15:00:36.395709 2021] [evasive20:error] [pid 19469:tid 1643828256] [client 10.6.0.5:54099] client denied by server configuration: /var/www/nextcloud/apps/files/
[Fri Jul 23 15:00:36.974432 2021] [evasive20:error] [pid 19469:tid 2536907808] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/apps/files/
[Fri Jul 23 15:00:37.767787 2021] [evasive20:error] [pid 19469:tid 3460105248] [client 10.6.0.5:54260] client denied by server configuration: /var/www/nextcloud/apps/files/
[Fri Jul 23 15:00:38.752870 2021] [evasive20:error] [pid 19469:tid 2411017248] [client 10.6.0.5:54099] client denied by server configuration: /var/www/nextcloud/remote.php
[Fri Jul 23 15:00:39.911324 2021] [evasive20:error] [pid 19469:tid 2360661024] [client 10.6.0.5:54099] client denied by server configuration: /var/www/nextcloud/apps/files/
[Fri Jul 23 15:01:24.060257 2021] [access_compat:error] [pid 21128:tid 2033345568] [client 10.6.0.5:60901] AH01797: client denied by server configuration: /var/www/nextcloud/config

The output of your Apache Conf`:

<IfModule mod_ssl.c>
  <VirtualHost _default_:443>
    DocumentRoot /var/www/nextcloud
    CustomLog /var/log/apache2/nc-access.log combined
    ErrorLog  /var/log/apache2/nc-error.log
    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/platofan27.ddns.net/fullchain.pem
	SSLCertificateKeyFile /etc/letsencrypt/live/platofan27.ddns.net/privkey.pem
	Include /etc/letsencrypt/options-ssl-apache.conf
    ServerName platofan27.ddns.net
  	RequestHeader set X-Forwarded-Proto "https"
	Protocols h2 http/1.1
    Timeout 600
	ProxyTimeout 600
    SSLProxyEngine on                                                                                                                                                                            
	ProxyRequests Off
  	ProxyErrorOverride Off
  	ProxyPreserveHost On
    <Location />
      Require all granted
    </Location>
  </VirtualHost>
  <Directory /var/www/nextcloud/>
    Options -Indexes -Includes +FollowSymlinks
    AllowOverride All
	Allow from all 
    <IfModule mod_dav.c>
      Dav off
    </IfModule>
    LimitRequestBody 0
    SSLRenegBufferSize 10486000
    <RequireAll>
    	<RequireAny>
      		Require ip 192.168.2.0/24
      		Require ip 10.6.0.0/24
   		</RequireAny>
     </RequireAll>
      Require all granted
  </Directory>
  <IfModule mod_headers.c>
    Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains"
  </IfModule>
</IfModule>

The output of your Nextcloud Conf`:

<?php
$CONFIG = array (
  'instanceid' => 'ocs5qtjgkxxk',
  'passwordsalt' => 'ty//+w0JAPNS506u5Nw+mkDj8eZ7Ax',
  'trusted_domains' =>
  array (
    0 => 'platofan27.ddns.net',
    1 => '192.168.2.206',
    2 => '192.168.2.206',
  ),
  'datadirectory' => '/media/Volume1/NextcloudData',
  'version' => '21.0.3.1',
  'dbtype' => 'mysql',
  'dbhost' => 'localhost',
  'dbname' => 'nextcloud',
  'dbuser' => 'ncadmin',
  'dbpassword' => '9Wyout1+4ovCWDSOKcrKXh9wMc8UfGF1nNYQ7coEzqA=',
  'dbtableprefix' => 'oc_',
  'installed' => true,
  'default_language' => 'de',
  'force_language' => 'de',
  'default_locale' => 'de_DE',
  'default_phone_region' => 'DE',
  'force_locale' => 'de_DE',
  'defaultapp' => 'files',
  'knowledgebaseenabled' => true,
  'allow_user_to_change_display_name' => true,
  'remember_login_cookie_lifetime' => 1296000,
  'session_lifetime' => 86400,
  'session_keepalive' => true,
  'auto_logout' => true,
  'token_auth_enforced' => false,
  'token_auth_activity_update' => 60,
  'auth.bruteforce.protection.enabled' => true,
  'auth.webauthn.enabled' => true,
  'skeletondirectory' => '/var/www/nextcloud/core/skeleton',
  'templatedirectory' => '/var/www/nextcloud/core/skeleton/Templates',
  'lost_password_link' => 'disabled',
  'overwriteprotocol' => 'https',
  'overwrite.cli.url' => 'https://platofan27.ddns.net',
  'htaccess.RewriteBase' => '/',
  'htaccess.IgnoreFrontController' => false,
  'allow_local_remote_servers' => true,
  'trashbin_retention_obligation' => 'auto',
  'versions_retention_obligation' => 'auto',
  'appcodechecker' => true,
  'updatechecker' => true,
  'updater.server.url' => 'https://updates.nextcloud.com/updater_server/',
  'updater.release.channel' => 'stable',
  'has_internet_connection' => false,
  'check_for_working_htaccess' => true,
  'check_data_directory_permissions' => true,
  'config_is_read_only' => false,
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud.log',
  'logfilemode' => 416,
  'loglevel' => 2,
  'syslog_tag' => 'Nextcloud',
  'log.condition' =>
  array (
    'shared_secret' => '57b58edb6637fe3059b3595cf9c41b9',
 'users' =>
    array (
      0 => 'sample-user',
    ),
    'apps' =>
    array (
      0 => 'files',
    ),
  ),
  'logdateformat' => 'F d, Y H:i:s',
  'logtimezone' => 'Europe/Berlin',
  'log_query' => false,
  'log_rotate_size' => 104857600,
  'customclient_desktop' => 'https://nextcloud.com/install/#install-clients',
  'customclient_android' => 'https://play.google.com/store/apps/details?id=com.nextcloud.client',
  'customclient_ios' => 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8',
  'customclient_ios_appid' => '1125420102',
  'appstoreenabled' => true,
  'appstoreurl' => 'https://apps.nextcloud.com/api/v1',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    ),
  ),
  'enable_previews' => true,
  'preview_max_x' => 4096,
  'preview_max_y' => 4096,
  'preview_max_filesize_image' => 50,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\HEIC',
    4 => 'OC\\Preview\\BMP',
    5 => 'OC\\Preview\\XBitmap',
    6 => 'OC\\Preview\\MP3',
    7 => 'OC\\Preview\\TXT',
    8 => 'OC\\Preview\\MarkDown',
    9 => 'OC\\Preview\\OpenDocument',
    10 => 'OC\\Preview\\Krita',
  ),
  'ldapUserCleanupInterval' => 51,
  'sort_groups_by_name' => false,
  'maintenance' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 1.5,
    'password' => '',
    'dbindex' => 0,
  ),
  'memcached_servers' =>
 array (
    0 =>
    array (
      0 => 'localhost',
      1 => 11211,
    ),
  ),
  'memcached_options' =>
  array (
    14 => 50,
    15 => 50,
    19 => 50,
    20 => 50,
    8 => 50,
    -1001 => true,
    16 => true,
    18 => true,
  ),
  'cache_path' => '',
  'cache_chunk_gc_ttl' => 86400,
  'mysql.utf8mb4' => true,
  'supportedDatabases' =>
  array (
    0 => 'sqlite',
    1 => 'mysql',
    2 => 'pgsql',
    3 => 'oci',
  ),
  'tempdirectory' => '/media/Volume1/NextcloudData/tmp',
  'hashing_default_password' => false,
  'hashingThreads' => 1,
  'hashingMemoryCost' => 65536,
  'hashingTimeCost' => 4,
'hashingCost' => 10,
  'blacklisted_files' =>
  array (
    0 => '.htaccess',
  ),
  'share_folder' => '/',
  'theme' => '',
  'cipher' => 'AES-256-CTR',
  'minimum.supported.desktop.version' => '2.0.0',
  'localstorage.allowsymlinks' => false,
  'quota_include_external_storage' => false,
  'external_storage.auth_availability_delay' => 1800,
  'filesystem_check_changes' => 0,
  'part_file_in_storage' => true,
  'mount_file' => '/var/www/nextcloud/data/mount.json',
  'filesystem_cache_readonly' => false,
  'secret' => 'KfKrEy9V3XyY5TOnijBYhuOxWnb8gIjvm/MhjEf7TcOq3Gtt',
  'forwarded_for_headers' =>
  array (
    0 => 'HTTP_X_FORWARDED',
    1 => 'HTTP_FORWARDED_FOR',
  ),
  'max_filesize_animated_gifs_public_sharing' => 10,
  'filelocking.enabled' => true,
  'filelocking.ttl' => 3600,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.debug' => false,
  'upgrade.disable-web' => false,
  'debug' => false,
  'data-fingerprint' => '',
  'csrf.optout' =>
 array (
    0 => '/^WebDAVFS/',
    1 => '/^Microsoft-WebDAV-MiniRedir/',
  ),
  'login_form_autocomplete' => true,
  'app_install_overwrite' =>
  array (
    0 => 'files_downloadactivity',
    1 => 'files_trackdownloads',
    2 => 'workflow_pdf_converter',
    3 => 'spreed',
    4 => 'facerecognition',
    5 => 'whiteboard',
    6 => 'twofactor_admin',
  ),
  'ldapIgnoreNamingRules' => false,
  'jpeg_quality' => '60',
);