Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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)?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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