Files not showed in Files main app over internet

Nextcloud version : 24.0.5 (same on 23.x.x)
Operating system and version : Debian DietPi 8.9.2
nginx version : 1.23.1
PHP version (eg, 7.4): 8.0.23

The issue you are facing:

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

Steps to replicate it:

  1. install and fully setup Nextcloud with Nginx via docker-compose
  2. without finding reason, probably update to some of 23.x.x version
  3. error on admin settings overview

The output of your Nextcloud log in Admin > Logging:

empty log

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '',
    'password' => '',
    'port' => ,
  ),
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '+R4H5uDhjHP33svB0AfS',
  'trusted_domains' =>
  array (
    0 => 'my.domain',
    1 => '192.168.x.x',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '24.0.5.1',
  'overwrite.cli.url' => 'https://my.domain',
  'dbname' => '',
  'dbhost' => '',
  'dbport' => '',
  'dbtableprefix' => '',
  'mysql.utf8mb4' => true,
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'app_install_overwrite' =>
  array (
    0 => 'dashboardcharts',
    1 => 'occweb',
    2 => 'files_3d',
    3 => 'ocsms',
  ),
  'loglevel' => 2,
  'maintenance' => false,
  'default_phone_region' => 'PL',
  'trashbin_retention_obligation' => 'auto',
  'opcache.save_comments' => 1,
  'opcache.revalidate_freq' => 60,
);

The output of your Apache/nginx/system log in /var/log/____:

nginx/var/log/
faillog -empty
lastlog -empty
docker log:
nothing with error

When Admin settings overview can be loaded it print:

The data folder and your files are probably accessible from the Internet. The .htaccess file does not work. We strongly recommend that you configure the web server so that the data folder is no longer accessible or move the folder out of the root of the web server.

Checked and data directory is not accessible from the internet.

When it was resolved first time while ver 21.x.x nothing was changed regarding .htaccess file.

I don’t understand why NC warning and blocking files while Nginx not using .htaccess file?

You Nextcloud has got a problem with the location of the datadirectory.
Where is your Nextcloud installed? Post e.g. full path of your config/config.php.

Maybe Nextcloud is wrong installed.
Also you can move your datadirectory e.g. to /datadirectory outside webserver path and all is fine.

With correct setting also it is no problem to have datadirectory in webserver path.
Professionals, however, would still not do that if possible.

Thank You @devnull for response.

in config.php

'datadirectory' => '/var/www/html/data',

in nginx.conf

user            www-data;
[...]
root /var/www/html;

in docker-compose.yml

user: www-data
[...]
<docker-compose.yml_file_location>/docker/nextcloud/data:/var/www/html/data
<docker volume>app_data:/var/www/html

File with perm 755.ocdata and 770./docker/nextcloud/data have owner and group www-data.

I don’t change anything and got this problem. Only previous update could made it.