How to limit virtual host bandwidth

I want to run a web hosting, and I want to limit every virtual host
bandwidth as a whole (No need limit_conn*limit_rate), how?

If can’t, how to limit client connection and server connection number at
the same time, like this:
limit_zone client_conn $binary_remote_addr 10m;
limit_conn client_conn 20;
limit_zone server_conn $server_name 10m;
limit_conn server_conn 100;
This is invalide in nginx config, how to make it work?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs