I'm having problem with redis module: http://wiki.nginx.org/HttpRedis (version 0.32 downloaded from mirror at https://github.com/elcuervo/nginx_http_redis)
As I tried, variable $redis_db is never used and result always comes from "default" - database 0.
Am I missing something in my config?
my nginx.conf (part of):
upstream { server 192.168.2.178:6379; keepalive 256 single;}
location /testredisselect0
{
default_type text/html;
set $redis_key "$uri?dbid=notdef";
redis_pass redisbackend;
}
location /testredisselect1
{
default_type text/html;
set $redis_db "1";
set $redis_key "$uri?dbid=1";
redis_pass redisbackend;
}
curl "http://localhost/testredisselect0"
curl "http://localhost/testredisselect1"
result in redis monitor:
1307190385.099634 "select" "0"
1307190385.099688 "get" "/testredisselect0?dbid=notdef"
1307190387.739512 "select" "0"
1307190387.739561 "get" "/testredisselect1?dbid=1"
As I can see, command always issues select 0, although it should run select 1 in second case.
Damir