You could have one or more applications proxied behind nginx and you want to set rate limites to prevent DDOS attacks .
The configuration is simple. The very details of each and every parameter can be found here.
You can configure this by using the following steps:
Configure the HTTP block, usually present in the nginx.conf file. One of the critical and important things to note this is, this can only be configured at one place , not per site. So Do your configurations accordingly and keep configuration local as much as possible, in the apps conf file. So here is the config