Answer the question
In order to leave comments, you need to log in
Nginx: How to limit the number of connections for different virtual hosts?
Hello!
Can you please tell me if it will be possible to limit the number of connections
for various hostnames using directives from the
ngx_http_limit_zone_module module?
For example, do this:
limit_zone one $hostname 10m;
limit_conn one 10;
Those. so that for each hostname there can be no more than 10 simultaneous connections.
If that doesn't work, what's the best way to implement this constraint?
Thanks in advance for your replies.
Answer the question
In order to leave comments, you need to log in
Wait. And how does the server know which virtual host the client will make a request to? This information is passed in the HTTP header after the connection has been established.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question