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?

1 Answer 1


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 20971520

Where 20971520 is 20MB, as this directive expect an argument as bytes.

From ModSecurity Handbook

SecRequestBodyLimit Sets the maximum request body size ModSecurity will accept

The SecRuleEngine directive is context-sensitive (i.e., it works with Apache’s container tags , , and so on), which means that you are able to control exactly where ModSecurity runs. [Rui: and define parameters]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .