Answer the question
In order to leave comments, you need to log in
How to set the value of keepalive_timeout as a variable?
I need to close a connection to a group of clients by a condition (this could be an IP address, UA, referrer, etc.),
so I need to declare it as a map, like this:
map $remote_addr $test_keepalive {
default "30";
"4.4.4.4" "0";
}
keepalive_timeout $test_keepalive;
nginx: [emerg] "keepalive_timeout" directive invalid value
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question