Is it possible to set a limit of simultaneous requests for each vhost? Basically to prevent connections to a single vhost to fill all connection slots.

My guess would be "no", because Apache has to accept a connection in order to know the vhost, so the "real" solution would be to use different IPs. Maybe it's possible at a lower level (e.g. before it runs CGI/mod_php)?


You may want to try mod_vhost_limit (apache 1.3x) ... which can then set MaxVhostClients n under the VirtualHost directive

Similar module is mod_slotlimit .

And bw_mod (apache 2.x) - http://ivn.cl/category/apache/ .

I hope you can find package for your OS for these packages though.

Otherwise you can limit how many CPU resources and memory resources can apache spend per virtualhost ... but for the connections, that module is what you want the most probably.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.