yum install git
git clone https://github.com/loveshell/ngx_lua_waf
cd ngx_lua_waf/
vi install.sh
yum install -y vim-enhanced
cd ngx_lua_waf/
vim install.sh
yum install -y unzip
ls /data/
yum install readline-devel pcre-devel openssl-devel gcc
wget https://openresty.org/download/openresty-1.11.2.2.tar.gz
tar zxvf openresty-1.11.2.2.tar.gz
cd openresty-1.11.2.2
./configure --prefix=/www/openresty --with-luajit --without-http_redis2_module --with-http_iconv_module
gmake
gmake install
/www/openresty/nginx/sbin/nginx
wget https://github.com/loveshell/ngx_lua_waf/archive/master.zip --no-check-certificate
unzip master.zip
cd ngx_lua_waf-master/
mv ngx_lua_waf-master/ lua_waf
cd lua_waf/
vi nginx.conf
vi lua_waf/waf.lua
/www/openresty/nginx/sbin/nginx -s reload
curl http://localhost
curl http://localhost/?id=../etc/passwd
http {
include mime.types;
default_type application/octet-stream;
lua_need_request_body on;
lua_package_path "/www/openresty/nginx/conf/lua_waf/?.lua";
lua_shared_dict limit 10m;
init_by_lua_file /www/openresty/nginx/conf/lua_waf/init.lua;
access_by_lua_file /www/openresty/nginx/conf/lua_waf/waf.lua;