Nginx redis, select database not working?
logar.damir
nginx-forum at nginx.us
Sat Jun 4 16:40:20 MSD 2011
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
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,203861,203861#msg-203861
More information about the nginx
mailing list