Welcome! Log In Create A New Profile

Advanced

limit_conn with variables erroring with invalid number of connections

April 23, 2017 09:14PM
Here is the configuration:

http {
limit_conn_zone $binary_remote_addr zone=limitapinoauth:16m;
limit_conn_zone $remote_user zone=limitapi:32m;

map $remote_user $limit_zone {
default limitapi;
'' limitapinoauth;
}

map $remote_user $limit_number {
default 100;
'' 200;
}
}

server {
limit_conn $limit_zone $limit_number;
}

When starting NGINX getting a fatal error though. Does limit_conn support using variables?

error => invalid number of connections "$limit_number"
Subject Author Posted

limit_conn with variables erroring with invalid number of connections

justink101 April 23, 2017 09:14PM

Re: limit_conn with variables erroring with invalid number of connections

Francis Daly April 29, 2017 08:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 305
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready