Install the ngx_luamodule module

Source: Internet
Author: User
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.