0

Common nginx configuration for all Vhosts

CreativeWolf vor 4 Jahren 0

Hi,


Currently I'm using the ngx_http_limit_req_module as follows for every single Vhost (by changing the zone name:


limit_req directive in the Custom Configuration under Content Tab


location ~* wp\-login\.php {

limit_req zone=cwwp burst=1 nodelay;
}

and the limit_req directive in the Custom Top Level Configuration under Advanced Tab


limit_req_zone $binary_remote_addr zone=cwwp:10m rate=3r/m;


I'd like to use one common for all the Vhosts.


I tried adding the limit_req directive in a file /etc/nginx.wp/restrictions.conf but when I tried adding the limit_req_zone directive nginx throws error.


Kindly help.


Peace