limit connection based on Host header

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


Hi,

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?

Thanks!
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170203/e556ebaa/attachment-0001.html>


More information about the nginx mailing list