通过调整Web服务器配置文件中的限制解决。
在apache服务器的配置文件(/etc/httpd/conf/httpd.conf)中,将LimitRequestBody的值增加到足够大的值,例如:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^ index.html [L]
</IfModule>
Set various options
ServerTokens OS
ServerSignature Off
LimitRequestBody 0 # 修改这里,将值增加到足够大的值,例如10000000
ErrorLog /var/log/httpd/error_log
LogLevel warn
CustomLog /var/log/httpd/access_log combined
在nginx服务器中,需修改nginx.conf文件。在http段中添加 client_max_body_size 10m;
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
client_max_body_size 10m;
include /etc/nginx/conf.d/*.conf;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
}
}
注意修改值大小为足够大的值。然后重启Web服务器,在KiwiTCMS应用程序中重新提交附件,应该会成功上传。