nginx-lua-and-beyond

nginx-lua-and-beyond

ID:40391135

大小:6.98 MB

页数:102页

时间:2019-08-01

nginx-lua-and-beyond_第1页
nginx-lua-and-beyond_第2页
nginx-lua-and-beyond_第3页
nginx-lua-and-beyond_第4页
nginx-lua-and-beyond_第5页
资源描述:

《nginx-lua-and-beyond》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、NGINX,Lua,andbeyond☺agentzh@gmail.com☺YichunZhang(agentzh)2014.02.25ngx_echoecho"helloworld";echo_after_body"somefooter...";echo_duplicate1024"a";echo_sleep1.5;echo_exec/foo;echo_location/baz;echo_subrequest_asyncDELETE/bar$echo_request_methodngx_headers_moremore_clea

2、r_headersServerXPoweredBy;more_set_headers'Foo:bar';more_set_input_headers'UserAgent:curl';ngx_set_miscset_unescape_uri$name$arg_name;set_if_empty$name"anonymous";set_random$rand110;set_formatted_local_time$timestr"%a%b%e%H:%M:%S%Y%Z";location=/memcset{set$memc_cmdset

3、;set$memc_keyfoo;set$memc_valueblah;set$memc_exptime60;#60secmemc_pass127.0.0.1:11211;}Ragelngx_redis2location=/redistest{redis2_querydelkey1;redis2_querylpushkey1A;redis2_querylpushkey1B;redis2_pass127.0.0.1:6379;}upstreammysql_backend{drizzle_server127.0.0.1:3306dbn

4、ame=testpassword=some_passuser=montyprotocol=mysql;}server{location=/mysql{set$query'select*fromcats';drizzle_query$query;drizzle_passmysql_backend;rds_jsonon;#orrds_csvon}libdrizzlelibpqOracle?OCI?ngx_srcachelocation/foo{set$key$uri$args;srcache_fetchGET/memc$key;src

5、ache_storePUT/memc$key;srcache_store_statuses200301302;#proxy_pass/fastcgi_pass/drizzle_pass/echo/etc}ngx_replace_filterlocation~'.cpp$'{#proxy_pass/fastcgi_pass/root/...replace_filter_typestext/plain;#skipC/C++stringliterals:replace_filter"'(?:\[^]

6、[^'])*'"$&g;

7、replace_filter'"(?:\[^]

8、[^"])*"'$&g;#removeallthoseuglyC/C++comments:replace_filter'/*.*?*/

9、//[^]*'''g;}libsregexnginx.confscriptingngx_luainit_by_luainit_worker_by_luaset_by_luarewrite_by_luaaccess_by_luacontent_by_luaheader_filter_by_luabody_filter_by_lualo

10、g_by_lua"Lightthreads"basedonLuacoroutinesngx.location.capture("/foo")ngx.location.capture_multi{{"/foo"},"/bar"}}localsock=ngx.socket.tcp()localok,err=sock:connect("127.0.0.1",1234)localbytes,err=sock:send("hello")localdata,err=sock:receive("*l")localsock=ngx.socket.

11、udp()localok,err=sock:setpeer("127.0.0.1",5432)localbytes,err=sock:send("myquery")localdgram,err=sock:receive()localreq_body

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
相关文章
更多
相关标签