Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx How to enable NGINX LUA?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Oxide, Feb 26, 2016.

  1. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    10:37 PM
    Hello,


    I went to "/etc/centminmod" but i see no custom_config.inc, only "php.d" directory.

    How wuold I go about enabling nginx lua? is it supported for my nginx?


    here is nginx-V result:
    Code:
    nginx version: nginx/1.9.11
    built by clang 3.4.2 (tags/RELEASE_34/dot2-final)
    built with LibreSSL 2.2.6
    TLS SNI support enabled
    configure arguments: --with-ld-opt='-lrt -ljemalloc -Wl,-z,relro' --with-cc-opt='-m64 -mtune=native -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wno-sign-compare -Wno-string-plus-int -Wno-deprecated-declarations -Wno-unused-parameter -Wno-unused-const-variable -Wno-conditional-uninitialized -Wno-mismatched-tags -Wno-c++11-extensions -Wno-sometimes-uninitialized -Wno-parentheses-equality -Wno-tautological-compare -Wno-self-assign -Wno-deprecated-register -Wno-deprecated -Wno-invalid-source-encoding -Wno-pointer-sign -Wno-parentheses -Wno-enum-conversion' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_sub_module --with-http_addition_module --with-http_image_filter_module --with-http_secure_link_module --with-http_realip_module --with-http_geoip_module --with-openssl-opt=enable-tlsext --add-module=../ngx-fancyindex-ngx-fancyindex --add-module=../ngx_cache_purge-2.3 --add-module=../nginx-accesskey-2.0.3 --add-module=../nginx-http-concat-master --add-module=../openresty-memc-nginx-module-4f6f78f --add-module=../openresty-srcache-nginx-module-ffa9ab7 --add-module=../ngx_devel_kit-0.2.19 --add-module=../set-misc-nginx-module-0.29 --add-module=../echo-nginx-module-0.58 --add-module=../redis2-nginx-module-0.12 --add-module=../ngx_http_redis-0.3.7 --add-module=../nginx_upstream_check_module-0.3.0 --add-module=../nginx-module-vts --add-module=../headers-more-nginx-module-0.28 --with-openssl=../libressl-2.2.6 --with-libatomic --with-threads --with-stream --with-stream_ssl_module --with-pcre=../pcre-8.37 --with-pcre-jit
    I google and found only this: nginx 1.9.11 incompatibility · Issue #668 · openresty/lua-nginx-module · GitHub
    Which seems fixed? help :) pls
     
  2. pamamolf

    pamamolf Premium Member Premium Member

    4,087
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    2:37 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    Just enable it on centmin.sh and recompile Nginx :)

    Code:
    ORESTY_LUANGINX='n'
    If you want to always have it enabled when you upgrade Nginx create this file and add it there:

    Code:
    /etc/centminmod/custom_config.inc
     
  3. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    10:37 PM
    ah interesting :) so that's it?
    is it comptiable again or whats the status, any idea?
     
  4. pamamolf

    pamamolf Premium Member Premium Member

    4,087
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    2:37 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    I think yes it is compatible :)
     
  5. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    10:37 PM
    adding module in ../ngx-fancyindex-ngx-fancyindex
    + ngx_http_fancyindex_module was configured
    adding module in ../ngx_cache_purge-2.3
    + ngx_http_cache_purge_module was configured
    adding module in ../nginx-accesskey-2.0.3
    + ngx_http_accesskey_module was configured
    adding module in ../nginx-http-concat-master
    + ngx_http_concat_module was configured
    adding module in ../openresty-memc-nginx-module-4f6f78f
    + ngx_http_memc_module was configured
    adding module in ../openresty-srcache-nginx-module-ffa9ab7
    + ngx_http_srcache_filter_module was configured
    adding module in ../ngx_devel_kit-0.2.19
    + ngx_devel_kit was configured
    adding module in ../set-misc-nginx-module-0.29
    found ngx_devel_kit for ngx_set_misc; looks good.
    + ngx_http_set_misc_module was configured
    adding module in ../echo-nginx-module-0.58
    + ngx_http_echo_module was configured
    adding module in ../redis2-nginx-module-0.12
    + ngx_http_redis2_module was configured
    adding module in ../ngx_http_redis-0.3.7
    + ngx_http_redis_module was configured
    adding module in ../lua-nginx-module-0.9.18
    ./configure: error: no ../lua-nginx-module-0.9.18/config was found

    Thu Feb 25 16:14:57 UTC 2016
    Error: 1, Nginx configure failed
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,907
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    10:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod 123.08stable and 123.09beta01 has lua nginx module disabled out of box due to Nginx 1.9.11+ incompatibility see Nginx 1.9.11 dynamic module compatibility | Centmin Mod Community If you want to use lua nginx or ngx_pagespeed you need to use Centmin Mod 123.09beta01 which has updated code to give you the ability to manually re-enable ngx_pagespeed 1.10.33.5 or lua nginx module support.

    For lua nginx you need to use version 0.10.1rc1 - see example at Nginx - Nginx 1.9.11 next version with dynamic module support ! | Page 4 | Centmin Mod Community with persistent config setup at /etc/centminmod/custom_config.inc with:
    Code:
    ORESTY_LUANGINX='y'
    ORESTY_LUANGINXVER='0.10.1rc1'
    Then using centmin.sh menu option 4, recompile of nginx 1.9.12 which will auto switched from LibreSSL 2.2.6 back to OpenSSL 1.0.2f for lua 0.10 branch support

    You can use centmin.sh menu option 23 submenu option 1 + 3 or 3 (if you previously did 1) to switch centmin mod branches as outlined at Upgrade Centmin Mod - CentminMod.com LEMP Nginx web stack for CentOS
     
    Last edited: Feb 26, 2016
  7. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    10:37 PM
    What kind of issues can I expect running nginx lua? That's all i want.
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,907
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    10:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    ??? how would I know 100% ? Centmin Mod 123.09beta01 is beta and lua 0.10 is rc release, you'll run into whatever unexpected issues there may be and will need to address that as they come along :)

    I'm using lua nginx 0.10.1rc1 with centmin mod 123.09beta01 on my centminmod.com site's 16+ VPS cluster so far with Nginx 1.9.12 Nginx - [nginx-announce] nginx-1.9.12 | Page 2 | Centmin Mod Community :)
     
  9. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    10:37 PM
     
  10. eva2000

    eva2000 Administrator Staff Member

    54,907
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    10:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    pcre-8.37 in your error suggests you still using centmin 123.08stable and that doesn't work with lua nginx or ngx_pagespeed right now. If you want to use lua nginx or ngx_pagespeed you need to use Centmin Mod 123.09beta01 which has updated code to give you the ability to manually re-enable ngx_pagespeed 1.10.33.5 or lua nginx module support.

    Upgrading Centmin Mod Code to Latest Version



    Getting Started Guide step 19 outlines also how to keep Centmin Mod code updated or how to switch version branches.

    Centmin Mod LEMP stack's script code is constantly updated for improvements, bug fixes and security fixes so keeping the Centmin Mod code up to date is important. With Centmin Mod 1.2.3-eva2000.08) (123.08stable) and higher releases, a newly added centmin.sh menu option 23 allows much easier code updates and version branch swicthing via Git backed environment you can setup. For full details read the following links:
    Upgrading Centmin Mod involves 2 parts.
    1. Upgrading the actual Centmin Mod code outlined at Upgrade Centmin Mod. This is heart of Centmin Mod where the code is the engine that runs centmin.sh shell based menu and all the automation you're accustomed to. You can easily update within a Centmin Mod version branch or switch version branches via centmin.sh menu option 23 outlined here.
    2. Upgrade software that Centmin Mod installed or manages. For this part following outline at How to upgrade Centmin Mod software installed on your server.
    So essentially, you can upgrade from .07 to .08 in place, but not everything is upgraded as some things like server initial environment setup isn't changed i.e. how swap, tmp setup and allocation are created etc. The main parts from part 2 above are what in place upgrades do i.e. Nginx and PHP-FPM compilation and config/settings parameters and MariaDB version from 5.5 to 10.0.x. If you want the full environment changed including tmp and swap setup to .08's configuration, then you would need a fresh OS install and fresh .08 initial install. You can think of it like upgrading Windows 7 to Windows 8. An in place upgrade will upgrade code but won't change your computer environment from when you installed Windows 7 i.e. disk configuration and partition sizes won't change from when you initially installed Windows 7. Only way to change that would be fresh Windows 8 install.
     
    Last edited: Feb 27, 2016