To limit the number of requests per IP (in case of a DOS) you can use the limit_conn_zone directive.
HTTP
Code:
limit_conn_zone $binary_remote_addr zone=myzone:10m;
SERVER
Code:
limit_conn myzone 10;
I understand this example, but when you have multiple virtual hosts, should you define a zone for each (or at least each important) virtual host/site?
Code:
limit_conn_zone $binary_remote_addr zone=myzone1:10m;
limit_conn_zone $binary_remote_addr zone=myzone2:10m;
limit_conn_zone $binary_remote_addr zone=myzone3:10m;
What size and number of connections did you set?
When and how do you use limit_conn_zone and limit_req_zone together?
Thanx.