I installed NextCloud using Docker, set the file upload size in the command, and accessed the browser page using IP+port to upload larger files. However, after using NAT to translate the address, only files below 30MB can be uploaded, otherwise an error message ‘Unknown error occurred during upload’ will be reported,after a while, I found out that IP+port access also reported errors‘Unknown error occurred during upload’ ,please help me
docker-compose.yml
version : '3.8'
services:
nextcloud:
container_name: nextcloud
image: nextcloud:28.0.9
restart: always
volumes:
- ./nextcloud:/var/www/html
ports:
- "8888:80"
environment:
- REDIS_HOST=192.168.2.110
- REDIS_HOST_PORT=6379
- PHP_MEMORY_LIMIT=2048M
- PHP_UPLOAD_LIMIT=10G
depends_on:
- mysql
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,
),
),
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '192.168.2.110',
'password' => '',
'port' => 6379,
),
'upgrade.disable-web' => true,
'instanceid' => 'oc***REDACTED***',
'passwordsalt' => '***REDACTED***',
'secret' => '***REDACTED***',
'trusted_domains' =>
array (
0 => '192.168.2.110:8888',
1 => '*.com',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'mysql',
'version' => '28.0.9.1',
'overwrite.cli.url' => 'http://192.168.2.110:8888',
'dbname' => 'nextcloud',
'dbhost' => '192.168.2.110:3306',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'oc_admin20',
'dbpassword' => '***REDACTED***',
'installed' => true,
);
root@0db12e542b35:/var/www/html# php -i |grep max
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
max_multipart_body_parts => -1 => -1
post_max_size => 10G => 10G
upload_max_filesize => 10G => 10G
zend.exception_string_param_max_len => 15 => 15
ldap.max_links => Unlimited => Unlimited
memcached.sess_lock_max_wait => not set => not set
memcached.sess_lock_wait_max => 150 => 150
session.gc_maxlifetime => 1440 => 1440
unserialize_max_depth => 4096 => 4096
opcache.jit_max_exit_counters => 8192 => 8192
opcache.jit_max_loop_unrolls => 8 => 8
opcache.jit_max_polymorphic_calls => 2 => 2
opcache.jit_max_recursive_calls => 2 => 2
opcache.jit_max_recursive_returns => 2 => 2
opcache.jit_max_root_traces => 1024 => 1024
opcache.jit_max_side_traces => 128 => 128
opcache.max_accelerated_files => 10000 => 10000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5