標準では2MBが最大なのだが、バックアップファイルのサイズは2MBを超えることもある。Moodleだけでは最大値は変更できないので、php-fpm側の設定を変更する。
環境
- Ubuntu 18.04
- Moodle 3.10
- php-fpm 7.2
- nginx 1.14.0 (Ubuntu)
設定
以下では、最大サイズを8MBに設定している。
/etc/php/7.2/fpm/php.ini
post_max_size = 8M
upload_max_filesize = 8M
max_execution_time = 600
/etc/nginx/sites-enabled/default
location ~ [^/]\.php(/|$) {
client_max_body_size 8m;
}
再起動
sudo systemctl restart php7.2-fpm
sudo systemctl restart nginx