--
You received this message because you are subscribed to the Google Groups "BeanDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beandb+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
key不是以/beansdb/开头的,就是一般的id,测试用的数据就是一般的文章id作为key,然后把内容content放到beansdb中。强宁的意思是不是我这句的key有问题set $memcached_key $request_uri;
如果我只是一般的id作为key,这里怎么写?
我一会自己再测试下,多谢强宁提点。
--
You received this message because you are subscribed to the Google Groups "BeanDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beandb+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
可以直接用location ~ ^/beansdb(/.+) {set $memcached_key $1;.....}
--
You received this message because you are subscribed to the Google Groups "BeanDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beandb+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
不知道啥什么原因,实事求是的说,我还是没能配置成功。
http {
upstream memcacheds {
server 127.0.0.1:7900;
server 127.0.0.1:7901;
server 127.0.0.1:7902;
server 127.0.0.1:7903;
}
}server {
listen 80;
server_name mvmap.com www.mvmap.com *.mvmap.com;
location /beansdb(/.+) {
default_type text/html;
set $memcached_key $1;
tornado拦截到了404,我这个key的value是文章内容,html格式的。memcached_next_upstream error timeout invalid_response;
add_header X-mem-key $memcached_key;
memcached_pass memcacheds;
memcached_connect_timeout 300ms;
memcached_read_timeout 3s;
memcached_send_timeout 1s;
}
}
http://www.mvmap.com/beansdb/1
如果我location ~ ^/beansdb(/.+) {set $memcached_key $1;.....}nginx拦截到404
真伤心,我回头再找找原因。--2013/12/3 Qiangning Hong <hon...@gmail.com>
是的,在 location 中使用正则可以获得 URL 中的内容。On Tue, Dec 3, 2013 at 12:42 PM, Davies Liu <davie...@gmail.com> wrote:
可以直接用location ~ ^/beansdb(/.+) {set $memcached_key $1;.....}不过需要注意的是,location 从 prefix 改为 regexp 会微妙的改变 location lookup 的顺序。--
You received this message because you are subscribed to the Google Groups "BeanDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beandb+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "BeanDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beandb+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.