Nginx: How to limit the number of connections for different virtual hosts?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
6 views
Hello!
Tell me, please, if we can limit the number of connections
for various hostnames c using directives from the module
ngx_http_limit_zone_module?
For example, to do so:
"limit_zone" one $hostname 10m;
limit_conn one 10;

Ie so each hostname could be no more than 10 simultaneous connections.
If this doesn't work, then how best to implement this restriction?

Thanks in advance for the answers.
by | 6 views

2 Answers

0 like 0 dislike
Wait. But how the server knows which virtual host the client will make a request? This information is transmitted in the HTTP header after the connection is established.
by
0 like 0 dislike
The ngx_http_limit_zone_module was used to limit the number of simultaneous connections for a given session or as a special case, from one address.
by

Related questions

0 like 0 dislike
4 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
27,902 users