[NextCloud]文件上传设置

完成私有网盘搭建后,发现没法上传大文件。找了不少资料,记录几个关键问题

Warning: Could not connect to appstore: cURL error 28

点击右上角 -> 设置,在设置界面的左侧列表的最后可以找到系统选项,无法打开,在日志界面发现如下问题:

1
2
3
4
[appstoreFetcher] Warning: Could not connect to appstore: cURL error 28: Operation timed out after 60000 milliseconds with 721996 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

GET /settings/apps
from 172.25.0.1 by zhujian at 2020-09-01T11:23:29+00:00

参考Could not connect to appstore: cURL error 28: Operation timed out after 60000 milliseconds with,进入Docker镜像后,修改文件/var/www/html/config/config.php,在最后添加

1
2
3
4
  ...
...
'appstoreenabled' => false,
);

完成后重新刷新界面,就能够登录系统界面,可以在这里找到当前PHP支持最大上传大小

提高网盘上传大小限制

参考[chevereto]图床,进入/usr/local/etc/php/conf.d修改文件memory-limit.ini,添加

1
2
3
4
...
upload_max_filesize=16G
post_max_size=16G
upload_tmp_dir=/var/big_temp_file/

新建文件夹/var/big_temp_file,并且配置其用户权限

1
2
$ mkdir /var/big_temp_file
$ chmod 777 /var/big_temp_file

修改Nginx配置文件,添加

1
2
3
4
5
6
7
8
server {
...
...

client_max_body_size 10240M;
...
...
}

重启NginxNextCloud,再次登录NextCloud后可以在系统界面上发现已经完成了提高网盘上传大小配置

相关阅读