现在位置 >首页 > Web
Nginx支持手机访问(WAP/XHTML)相关配置已关闭评论
2011年03月11日 Nginx ⁄ 被围观 7,852 次+
1、判断手机用户 一般通过User-Agent来判断,从网上抄一抄,那些列出的都不错,我的配置里加上了Java、curl和Wget,方便调试和其它内部项目的抓取。 因为现在很多手机网关没有发送User-Agent,所以大部分手机发送的User-Agent到了网关就被过滤掉了,相当于是空值。经过抽样调查,User-Agent为空且为手机用户比例比较大。有部分User-Agent为空的是一些蜘蛛或垃圾程序的造访,这些垃圾流量并不那么重要。希望手机网关将来有相应的标准,不要发送空的User-Agent,就是发送一个字母也好啊。 如果应用有一个独立域名,...
阅读全文

ngx_eval已关闭评论
2011年03月11日 Nginx ⁄ 被围观 5,795 次+
People have been reporting issues of my fork of ngx_eval when using it with recent versions of nginx. I’ve updated it to version 2011.01.12 to compatible with nginx 0.8.54+: https://github.com/agentzh/nginx-eval-module/downloads Now "eval_subrequest_in_memory" is off by default. Because subrequest_in_memory mode is still having issues. Here’s a small example for using ngx_eval with my ngx_redis2, an nginx upstream module that supports almost the full Redis 2.0 unified ...
阅读全文
ngx_lua v0.1.1: access_by_lua and access_by_lua_file landed已关闭评论
2011年03月11日 Nginx ⁄ 被围观 20,134 次+
After the first public release of ngx_lua, I’m proud to annouce the v0.1.1 version, which has introduced the access_by_lua and access_by_lua_file directives: https://github.com/chaoslawful/lua-nginx-module/downloads Now we can code up our own nginx access-phase handlers directly in pure Lua, with all the capabilities with rewrite_by_lua and content_by_lua, like firing up subrequests to other locations, reading/writing nginx variables, changing response headers, inter...
阅读全文