lenf 发表于 2016-12-27 06:52:56

lua脚本变了,要重新reload nginx 吗?

server{
lua_code_cache off;    //关闭lua缓存重启后生效
server_name localhost;
default_type 'text/plain';
content_by_lua_file /conf/lua/test.lua;//将lua程序用file文件加载
}
  默认情况下lua_code_cache  是开启的,即缓存lua代码,即每次lua代码变更必须reload nginx才生效,如果在开发阶段可以通过lua_code_cache  off;关闭缓存,这样调试时每次修改lua代码不需要reload nginx;但是正式环境一定记得开启缓存。  
页: [1]
查看完整版本: lua脚本变了,要重新reload nginx 吗?