Complete the code to set a connection limit zone named 'addr' with 10MB of shared memory.
limit_conn_zone $binary_remote_addr zone=addr:[1];The limit_conn_zone directive requires a zone size, such as 10m for 10 megabytes.
Complete the code to limit connections per IP address to 5.
limit_conn addr [1];The limit_conn directive sets the maximum number of connections per defined zone. Here, 5 connections per IP.
Fix the error in the code to correctly limit connections using the zone 'addr'.
limit_conn_zone $binary_remote_addr zone=addr:[1]; limit_conn addr 10;
The zone size must be specified with a lowercase 'm' for megabytes in limit_conn_zone. The limit_conn directive uses the zone name only, here 'addr'.
Fill both blanks to limit connections per IP to 3 with a 5MB zone named 'client'.
limit_conn_zone $binary_remote_addr zone=[1]:[2]; limit_conn client 3;
The zone name is 'client' and the zone size is '5m' for 5 megabytes.
Fill all three blanks to create a connection limit zone 'userip' with 15MB memory and limit connections to 7.
limit_conn_zone $binary_remote_addr zone=[1]:[2]; limit_conn [3] 7;
The zone name is 'userip', the size is '15m', and the limit_conn uses the same zone name 'userip'.