From 734a7531ba5951f4df3733cd3d05863b393b75ee Mon Sep 17 00:00:00 2001 From: Mikhail Date: Tue, 18 Feb 2014 15:00:21 +0500 Subject: [PATCH] Update ip_blacklist.conf.lua --- samples/ip_blacklist/ip_blacklist.conf.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/samples/ip_blacklist/ip_blacklist.conf.lua b/samples/ip_blacklist/ip_blacklist.conf.lua index 7068e18..4ea8b52 100644 --- a/samples/ip_blacklist/ip_blacklist.conf.lua +++ b/samples/ip_blacklist/ip_blacklist.conf.lua @@ -8,7 +8,7 @@ requires openresty bundle http://openresty.org/ Replace the distribution nginx with local installation of openresty -service nginx stop +# service nginx stop mv /usr/local/openresty/nginx/conf /usr/local/openresty/nginx/conf_install ln -s /etc/nginx /usr/local/openresty/nginx/conf mv /usr/sbin/nginx /usr/sbin/nginx-back @@ -18,9 +18,11 @@ mkdir /etc/nginx/lua cp ip_blacklist.conf.lua /etc/nginx/lua/ cp ip_blacklist.lua /etc/nginx/lua/ -Configure the NGINX +Configure the NGINX - add two lines only: +1) on http section init_by_lua_file +2) on location section access_by_lua_file -nginx.conf +nginx.conf example ... http { ... @@ -37,9 +39,6 @@ http { ... } } - ---~ package.path = '/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;' .. package.path -- .. ';' ---~ package.cpath = '/usr/local/openresty/lualib/?.so;' .. package.cpath --?? --]] ip_blacklist = {-- global config