安装Redis2
"This is an Nginx upstream module that makes nginx talk to a Redis 2.x server in a non-blocking way. The full Redis 2.0 unified protocol has been implemented including the Redis pipelining support.
This module returns the raw TCP response from the Redis server. It's recommended to use my LuaRedisParser (written in pure C) to parse these responses into lua data structure when combined with HttpLuaModule.When used in conjunction with HttpLuaModule, it is recommended to use the lua-resty-redis library instead of this module though, because the former is much more flexible and memory-efficient.
If you only want to use the get redis command, you can try out the HttpRedisModule. It returns the parsed content part of the Redis response because only get is needed to implement.
Another option is to parse the redis responses on your client side yourself."
The module is inspired by Apache's modconcat. It follows the same pattern for enabling the concatenation. It uses two ?, like this:
http://example.com/??style1.css,style2.css,foo/style3.css
If a third ? is present it's treated as version string. Like this:
http://example.com/??style1.css,style2.css,foo/style3.css?v=102234
location /static/css/ { concat on; concat_max_files 20; } location /static/js/ { concat on; concat_max_files 30; }

本文介绍了一种Nginx上游模块,该模块能够使Nginx以非阻塞方式与Redis2.x服务器通信,并实现了完整的Redis 2.0统一协议。此外,还介绍了受Apache mod_concat启发的资源文件合并模块,用于简化静态资源加载。
519

被折叠的 条评论
为什么被折叠?



