ModSecurity: Upload Files failed: Error 413 Request Entity Too Large

Testing a new website with the vendor.

The website got an error when uploading files.

Identified that was because of ModSecurity on our CentOS Plesk Host.

In the default, 1Mb:
SecRequestBodyNoFilesLimit 1048576


Required to edit /etc/httpd/conf/modsecurity.d/rules/tortix/modsec/tortix_waf.conf :
SecRequestBodyNoFilesLimit 10000000


Then:
service httpd restart



<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>413 Request Entity Too Large</title>
</head><body>
<h1>Request Entity Too Large</h1>
The requested resource<br />/upload<br />
does not allow request data with POST requests, or the amount of data provided in
the request exceeds the capacity limit.
</body></html>


Request URL: https://domain.hk/upload
Request Method: POST
Status Code: 413 
Remote Address: 1.2.3.4:443
Referrer Policy: no-referrer-when-downgrade


[client 10.11.12.13] ModSecurity: Request body no files data length is larger than the configured limit (1048576).. Deny with code (413) [hostname "domain.hk"] [uri "/upload"] [unique_id "X1iZ-KLURRvqcP2QHC3oMwAAAEg"], referer: https://domain.hk/add



References
Unable to upload file to the website: Request body no files data length is larger than the configured limit
https://support.plesk.com/hc/en-us/articles/115001764933-Unable-to-upload-file-to-the-website-Request-body-no-files-data-length-is-larger-than-the-configured-limit-



Update