打開nginx.conf配置
server{
lua_code_cache off; //關閉lua緩存 重啟后生效
server_name localhost;
default_type 'text/plain';
content_by_lua_file /conf/lua/test.lua; //將lua程序用file文件加載
}
nginx:[warn] lua_code_cache is off; this will hurt performance in /usr/local/nginx/conf/nginx.cof:87
注意:重啟nginx會有警告不用管它
修改完成,這樣就可以不需要重啟nginx情況下實時訪問lua程序