一. Nginx Lua实战
在目录里创建lua目录(这里发现windows下的Nginx已经存在lua目录)
1.演示init_by_lua_file
第一步:在lua中创建init.lua文件
ngx.log(ngx.ERR,"init lua success");
第二步:修改nginx.conf
init_by_lua_file lua/init.lua;
第三步:重新启动Nginx
⚠每次将Nginx停止运行都会报错nginx: [error] CreateFile() "D:/miaosha/tomcat/nginx.pid" failed (2: The system cannot find the file specified)