From fd14506f20b4b68f3db1aaf3716b550367069429 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Tue, 18 Feb 2014 15:10:15 +0500 Subject: [PATCH] Update ip_blacklist.conf.lua --- samples/ip_blacklist/ip_blacklist.conf.lua | 37 ---------------------- 1 file changed, 37 deletions(-) diff --git a/samples/ip_blacklist/ip_blacklist.conf.lua b/samples/ip_blacklist/ip_blacklist.conf.lua index 4ea8b52..48a1515 100644 --- a/samples/ip_blacklist/ip_blacklist.conf.lua +++ b/samples/ip_blacklist/ip_blacklist.conf.lua @@ -2,43 +2,6 @@ ¡ ¡ ¡ ALL GLORY TO GLORIA ! ! ! -requires openresty bundle http://openresty.org/ - or ngx-lua module http://wiki.nginx.org/HttpLuaModule#Installation - and lua-resty-redis from: https://github.com/agentzh/lua-resty-redis - -Replace the distribution nginx with local installation of openresty - -# 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 -ln -s /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx - -mkdir /etc/nginx/lua -cp ip_blacklist.conf.lua /etc/nginx/lua/ -cp ip_blacklist.lua /etc/nginx/lua/ - -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 example -... -http { - ... - # you do not need the following line if you are using the ngx_openresty bundle: - #lua_package_path "/path/to/lua-resty-redis/lib/?.lua;;"; - # Инициализировать ip_blacklist - init_by_lua_file '/etc/nginx/lua/ip_blacklist.conf.lua'; - - ... - - location <...> { - access_by_lua_file '/etc/nginx/lua/ip_blacklist.lua'; - proxy_pass ... - ... - } -} --]] ip_blacklist = {-- global config