<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>meisw's blog</title>
		<link>http://meisw.wdlinux.cn//</link>
		<description>工作,学习,生活,这里将会有一些记录.     备用域名:http://meisw.wdlinux.cn</description>
		<copyright>Copyright (C) 2004 Security Angel Team [S4T] All Rights Reserved.</copyright>
		<generator>SaBlog-X Version 1.6 Build 20080806</generator>
		<lastBuildDate>Fri, 05 Jun 2026 02:15:46 +0000</lastBuildDate>
		<ttl>30</ttl>
		<item>
			<guid>http://meisw.wdlinux.cn//show-858-1.html</guid>
			<title>openresty waf</title>
			<author>admin</author>
			<description><![CDATA[<div>
<div>yum install git</div>
<div>git clone https://github.com/loveshell/ngx_lua_waf</div>
<div>cd ngx_lua_waf/</div>
<div>vi install.sh&nbsp;</div>
<div>yum install -y vim-enhanced</div>
<div>cd ngx_lua_waf/</div>
<div>vim install.sh&nbsp;</div>
<div>yum install -y unzip</div>
<div>ls /data/</div>
<div>yum install readline-devel pcre-devel openssl-devel gcc</div>
<div>wget https://openresty.org/download/openresty-1.11.2.2.tar.gz</div>
<div>tar zxvf openresty-1.11.2.2.tar.gz&nbsp;</div>
<div>cd openresty-1.11.2.2</div>
<div>./configure --prefix=/www/openresty &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --with-luajit &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --without-http_redis2_module &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --with-http_iconv_module</div>
<div>gmake</div>
<div>gmake install</div>
<div>/www/openresty/nginx/sbin/nginx&nbsp;</div>
<div>wget https://github.com/loveshell/ngx_lua_waf/archive/master.zip --no-check-certificate</div>
<div>unzip master.zip&nbsp;</div>
<div>cd ngx_lua_waf-master/</div>
<div>mv ngx_lua_waf-master/ lua_waf</div>
<div>cd lua_waf/</div>
<div>vi nginx.conf</div>
<div>vi lua_waf/waf.lua&nbsp;</div>
<div>/www/openresty/nginx/sbin/nginx -s reload</div>
<div>curl http://localhost</div>
<div>curl http://localhost/?id=../etc/passwd</div>
</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>http {</div>
<div>&nbsp; &nbsp; include &nbsp; &nbsp; &nbsp; mime.types;</div>
<div>&nbsp; &nbsp; default_type &nbsp;application/octet-stream;</div>
<div>&nbsp; &nbsp; lua_need_request_body on;</div>
<div>&nbsp; &nbsp; lua_package_path &quot;/www/openresty/nginx/conf/lua_waf/?.lua&quot;;</div>
<div>&nbsp; &nbsp; lua_shared_dict limit 10m;</div>
<div>&nbsp; &nbsp; init_by_lua_file &nbsp;/www/openresty/nginx/conf/lua_waf/init.lua;&nbsp;</div>
<div>&nbsp; &nbsp; access_by_lua_file /www/openresty/nginx/conf/lua_waf/waf.lua;</div>]]></description>
			<link>http://meisw.wdlinux.cn//show-858-1.html</link>
			<category domain="http://meisw.wdlinux.cn//category-49-1.html">openresty</category>
			<pubDate>2016-12-12 22:47</pubDate>
		</item>
	</channel>
</rss>
