OpenResty® 是一个基于 Nginx 与 Lua 的高性能 Web 平台,其内部集成了大量精良的 Lua 库、第三方模块以及大多数的依赖项。用于方便地搭建能够处理超高并发、扩展性极高的动态 Web 应用、Web 服务和动态网关。
sudo yum install yum-utils
sudo yum-config-manager –add-repo https://openresty.org/package/centos/openresty.repo
sudo yum install openresty
下载waf文件 git clone https://github.com/unixhot/waf.git
Vi /usr/local/openresty/nginx/conf/nginx.conf
在里面http选项中增加waf地址:
http {
include mime.types;
default_type application/octet-stream;
#waf
lua_shared_dict limit 50m;
lua_package_path "/usr/local/openresty/nginx/conf/waf/?.lua";
init_by_lua_file "/usr/local/openresty/nginx/conf/waf/init.lua";
access_by_lua_file "/usr/local/openresty/nginx/conf/waf/access.lua";
之后就生效了
之后在nginx/sbin
执行 ./nginx -s reload
就可以正常运行了