OpenResty(4)--HttpLuaModule Simple Configuration,
OpenResty(4)--HttpLuaModule Simple Configuration,
HttpLuaModule 是集成 Nginx 和 Lua 通集的模块学习简单的Ngx_Lua command
vim /usr/local/openresty/nginx/conf/nginx.conf
1.lua_package_path #设置LUA搜索库路径,';;'代表默认路径
lua_package_path '/foo/bar/?.lua;/blah/?.lua;;';
2.lua_package_cpath #设置LUA用C写的类库
lua_package_cpath '/bar/baz/?.so;/blah/blah/?.so;;';
3.lua_use_default_type #设置是否使用指定的 default_type 指令发送 header 信息,如果不想使用可关闭,默认on
lua_user_default_type off
4.lua_code_cache #设置lua代码缓存对set_by_lua_file,content_by_lua_file,access_by_lua_file之类的指令起做用,默认 on
lua_code_cache on
参考:http://wiki.nginx.org/HttpLuaModule
评论暂时关闭