Two days ago encountered Nginx use if statement causes Nginx logic confusion problem, Mail to the agentzh@gmail.com. It is recommended that ngx_luamodule be used to process complicated logic. Brief introduction to the module installation process: & mdash; & two days before the mda encountered Nginx use if statement causes Nginx logic confusion problem, Mail to the agentzh@gmail.com. It is recommended that the ngx_lua module be used to process complicated logic. after all, if is edevil.
Briefly describe the module installation process:
--------------------------- # Reference Document ------------------------- # Project address https://github.com/chaoslawful/lua-nginx-module##Lua Nginx extension reference http://rhomobi.com/topics/112##Nginx And Lua references http://huoding.com/2012/08/31/156##HttpLuaModule Nginx Wiki http://wiki.nginx.org/HttpLuaModule --------------------------- # Download --------------------------- wget http://luajit.org/download/LuaJIT-2.0.2.tar.gzwget https://github.com/simpl/ngx_devel_kit/archive/v0.2.19.tar.gzwget https://github.com/chaoslawful/lua-nginx-module/archive/v0.9.1.tar.gzwget http://nginx.org/download/nginx-1.4.3.tar.gz --------------------------- # First install LuaJIT ------------------------------- # install LuaJITtar-zxvf LuaJIT-2.0.2.tar.gzcd. /configuremakemake installexport LUAJIT_LIB =/usr/local/libexport LUAJIT_INC =/usr/local/include/luajit-2.0 plugin # install Nginx plugin # unzip the downloaded ngx_devel_kit and lua-nginx-module to/usr/local/src # install nginx for convenient debugging, I added the echo module and enabled the debug mode. /configure-user = www-group = www \-prefix =/usr/local/nginx-1.4.3 \-with-http_stub_status_module \-with-http_ssl_module \-with-http_realip_module \-with-http_perl_module \-with-pcre =/usr /local/src/pcre-8.12 \-with-debug \-add-module =/usr/local/src/lua-nginx-module-0.9.1/\-add-module =/usr/local/src/ngx_devel_kit-0.2.19 /\-add-module =/usr/local/src/echo-nginx-module-0.49/--------------------------- # start nginx ---------------------------
Error handling: the database file cannot be found. The processing method is as follows.
Echo "/usr/local/lib">/etc/ld. so. conf. d/usr_local_lib.conf
Ldconfig
# Restart
/Usr/local/nginx-1.4.3/sbin/nginx