limit connection based on Host header

Frank Liu gfrankliu at
Sat Feb 4 05:54:43 UTC 2017


I have a default "server" block with "server_name _ ;".  Since connections
coming in may have different Host header, I am trying to limit the
connection based on Host header.

limit_conn_zone $server_name zone=perserver:10m;

limit_conn perserver 10;

Will this work?
It seems if the connection for one Host reaches 10, I see errors "limiting
connections by zone "perserver" for connections with other Host as well.
Did I miss anything?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list