From 3b2ae5598a90d21984a201a3bdffa23c309366a3 Mon Sep 17 00:00:00 2001 From: filesite Date: Tue, 8 Nov 2022 18:09:28 +0800 Subject: [PATCH] change default body size of nginx to 10m --- conf/app.php | 2 +- conf/nginx.conf | 2 ++ conf/nginx_machete.conf | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/app.php b/conf/app.php index a8fe328..6916ea4 100644 --- a/conf/app.php +++ b/conf/app.php @@ -64,7 +64,7 @@ $configs = array( 'captcha' => true, //后台登陆是否开启验证码 'maxUploadFileNumber' => 5, //一次批量上传文件数量 - 'maxUploadFileSize' => 20, //单位:Mb + 'maxUploadFileSize' => 10, //单位:Mb 'allowedUploadFileTypes' => array( 'image/jpeg', 'image/png', diff --git a/conf/nginx.conf b/conf/nginx.conf index 46bf3c3..e0f1f66 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -23,6 +23,8 @@ http { keepalive_timeout 65; types_hash_max_size 4096; + client_max_body_size 10m; + include /etc/nginx/mime.types; default_type application/octet-stream; diff --git a/conf/nginx_machete.conf b/conf/nginx_machete.conf index 0e91874..a7e1916 100644 --- a/conf/nginx_machete.conf +++ b/conf/nginx_machete.conf @@ -6,6 +6,8 @@ server { #charset UTF-8; #access_log logs/machete.access.log main; + client_max_body_size 10m; + root /var/www/machete/www; index index.php index.html;