Symptoms
- Unable to attach files bigger than 15MB in webmail with following error:
An error occurred! File upload failed
- Drag and drop file into webmail body message fails with following error:
Server error! (Request Entity Too Large)
-
Unable to attach big files to the website forms with the error below:
Connection to the server failed
- Following error message is shown in Apache log file:
# tail -f /var/log/httpd/error_log
[:error] ModSecurity: Request body (Content-Length) is larger than the configured limit (13107200). [hostname “webmail.example.com”] [uri “/”] [unique_id “Wvm2-f069f312c27e”], referer: http://webmail.example.com/?_task=mail&_action=compose&_id=123456789abcdefgh - ModSecurityÂ
SecRequestBodyLimit
parameter is set as follows:# egrep -Ri SecRequestBodyLimit /etc/httpd/conf.d/mod_security.conf
SecRequestBodyLimit 13107200
Cause
Upload file process fails because ModSecurity SecRequestBodyLimit
is reached.
Resolution
-
Log in to Plesk.
-
Navigate to Tools & settings > Web Application Firewall (ModSecurity) > Settings > Custom directives:
-
Add the field
SecResponseBodyLimit 67108864
-
Press Apply