I have a request to increase the POST limit of a particular vhost in Apache to 20MB.I do neither wish to increase all the vhosts in the server, nor disable modsecurity to that particular vhost.Is it possible to raise the POST limit only of one vhost in ModSecurity?
ModSecurity+Apache: Bigger POST limit for a vhost?
debian;apache httpd;configuration;apache virtualhost
Indeed you can increase the POST limit of a particular vhost.However, that is configured directly in the vhost file definition and not in modsecurity.For that, add this line to your vhost: SecRequestBodyLimit 20971520Where 20971520 is 20MB, as this directive expect an argument as bytes.From ModSecurity HandbookSecRequestBodyLimit   Sets the maximum request body size ModSecurity  will acceptThe SecRuleEngine directive is context-sensitive (i.e., it works with  Apaches container tags , , and so on), which  means that you are able to control exactly where ModSecurity runs.  [Rui: and define parameters]