一个roundcube的邮件系统,上传附件的时候提示上传附件失败。结合php+nginx的结构,最大可能就是nginx的配置问题。查看nginx日志,看到错误日志类似如下:
2022/06/30 23:02:02 [error] 2050#0: *6896 client intended to send too large body: 13707422 bytes, client: 39.185.210.24, server: mail.szl724.com, request: "POST /roundcube/?_task=mail&_remote=1&_from=compose&_id=22456968662be616b528a2&_uploadid=upload1656644522065&_action=upload HTTP/1.1", host: "mail.szl724.com", referrer: "http://mail.szl724.com/roundcube/?_task=mail&_action=compose&_id=22456968662be616b528a2"
2022/06/30 23:02:51 [notice] 2242#0: signal process started
打开nginx配置文件/etc/nginx/nginx.conf
在http模块中增加配置
client_max_body_size 100m;
修改后重新载入nginx