Welcome! Log In Create A New Profile

Advanced

please allow keepalive_timeout and keepalive_requests to accept variables

Posted by _ck_ 
please allow keepalive_timeout and keepalive_requests to accept variables
November 29, 2012 10:14AM
(before I forget, I was unable to login via any openid provider in trac.nginx.org, it may be broken)

Technically this is not a bug but a feature request.

Apparently keepalive_timeout and keepalive_requests can only take fixed values and dynamic variables.

ie. the last two lines of this currently fail in 1.25 with "invalid value" but I'd love it to work:

map $scheme $keepTimeout {
default 10;
http 10;
https 60;
}
map $scheme $keepRequests {
default 100;
http 100;
https 500;
}
keepalive_timeout $keeptimeout;
keepalive_requests $keepRequests;

# keepalive_timeout directive invalid value in nginx.conf


If anyone can post in trac and feels this is worthy, please feel free to copy it there.



Edited 1 time(s). Last edit at 11/29/2012 10:14AM by _ck_.
Re: please allow keepalive_timeout and keepalive_requests to accept variables
December 02, 2012 05:02AM
I have the same problem.

map $remote_addr $ka_timeout {
default 65;
#0.0.0.0/0 65;
184.222.8.31 0;

}

server {
listen 80;
server_name server.info;
keepalive_timeout $ka_timeout ;
....

I've got also this:
nginx: [emerg] "keepalive_timeout" directive invalid value in /etc/nginx/sites-enabled/server.info:19

I do not want to use "if" constructions.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 136
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready