Get the most out of your Centmin Mod LEMP stack
Become a Member

Nginx Nginx 1.9.11 next version with dynamic module support !

Discussion in 'Nginx and PHP-FPM news & discussions' started by eva2000, Feb 4, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    30,175
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    1:22 AM
    Nginx 1.13.x
    MariaDB 5.5
    Last edited: Feb 10, 2016
    • Like Like x 4
    • Winner Winner x 1
    • Informative Informative x 1
  2. ModeltogTossen

    ModeltogTossen I wish I could??

    313
    97
    28
    Dec 20, 2015
    Denmark
    Ratings:
    +143
    Local Time:
    5:22 PM
    1.9.12
    10.0.23
    Yeah - Thats beautiful - have been waiting for that options.. So ready to test it as soon 09beta got it when released from nginx.
     
  3. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    11:22 PM
    1.11
    10.2
    Not a big deal to me :D
    Since recompiling Nginx is just a matter of 1 minute :D.
     
    • Like Like x 1
  4. ModeltogTossen

    ModeltogTossen I wish I could??

    313
    97
    28
    Dec 20, 2015
    Denmark
    Ratings:
    +143
    Local Time:
    5:22 PM
    1.9.12
    10.0.23
    Correct - when nothing is failing - I do had some times where the re-compile did failed for me - and that 1 minute extended to 1-2 hours ;-) ..

    So I welcome that options very much..
     
  5. Xon

    Xon Active Member

    130
    57
    28
    Nov 16, 2015
    Ratings:
    +171
    Local Time:
    11:22 PM
    1.11.x
    MariaDB 10.1.x
    Finally, I'm looking forward to this improvement.
     
    • Agree Agree x 2
  6. negative

    negative Member

    216
    21
    18
    Apr 11, 2015
    Ratings:
    +49
    Local Time:
    6:22 PM
    1.9.10
    10.1.11
    Waiting absolutely :)
     
  7. eva2000

    eva2000 Administrator Staff Member

    30,175
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    1:22 AM
    Nginx 1.13.x
    MariaDB 5.5
    it's coming [nginx] Dynamic modules.

     
    • Informative Informative x 3
  8. eva2000

    eva2000 Administrator Staff Member

    30,175
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    1:22 AM
    Nginx 1.13.x
    MariaDB 5.5
    more developments nginx: log

     
    • Like Like x 1
  9. DroidOne

    DroidOne New Member

    5
    2
    3
    Feb 9, 2016
    Ratings:
    +6
    Local Time:
    5:22 PM
    1.9
    10.1
    If anyone plans on writing a guide for Pagespeed I'd be happy to take part of it :) There's often new versions, so not having to recompile would be neat (should also be easier to quickly go back, if a newer version proves troublesome...).
     
    Last edited: Feb 9, 2016
    • Creative Creative x 1
  10. eva2000

    eva2000 Administrator Staff Member

    30,175
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    1:22 AM
    Nginx 1.13.x
    MariaDB 5.5
    Centmin Mod Nginx already integrates ngx_pagespeed via source compile, see Nginx PageSpeed - CentminMod.com LEMP Nginx web stack for CentOS :)

    But we shall see how all Centmin Mod's compiled nginx modules play with Dynamic nginx module loading :D
     
    • Like Like x 1
  11. DroidOne

    DroidOne New Member

    5
    2
    3
    Feb 9, 2016
    Ratings:
    +6
    Local Time:
    5:22 PM
    1.9
    10.1
    [​IMG]

    Documentation here: Core functionality

    Rejoice :)
     
    • Like Like x 2
    • Informative Informative x 1
  12. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    11:22 PM
    1.11
    10.2
    Updated :D
     
    • Winner Winner x 1
  13. eva2000

    eva2000 Administrator Staff Member

    30,175
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    1:22 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  14. DroidOne

    DroidOne New Member

    5
    2
    3
    Feb 9, 2016
    Ratings:
    +6
    Local Time:
    5:22 PM
    1.9
    10.1
    I haven't looked into it yet, but I guess one problem will be swiftly obtaining the .so modules. I take it they're not hiding in some folder after downloading source and compiling nginx with the appropriate flags - or is it that easy? Never had a reason to go looking for them :)
     
  15. DroidOne

    DroidOne New Member

    5
    2
    3
    Feb 9, 2016
    Ratings:
    +6
    Local Time:
    5:22 PM
    1.9
    10.1
    Here's som more info on the official blog: Introducing Dynamic Modules in NGINX 1.9.11 - NGINX

     
    • Informative Informative x 2
  16. eva2000

    eva2000 Administrator Staff Member

    30,175
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    1:22 AM
    Nginx 1.13.x
    MariaDB 5.5
    testing on 123.09beta01 private local build first and tried that approach, stream module errors though when set to dynamic
    Code:
    Starting nginx: nginx: [emerg] unknown directive "stream" in /usr/local/nginx/conf/nginx.conf:20
    Code:
    ls -lah /usr/local/nginx/modules
    total 824K
    drwxr-xr-x.  2 root root  102 Feb 10 00:09 .
    drwxr-xr-x. 10 root root 4.0K Feb 10 00:01 ..
    -rwxr-xr-x.  1 root root 126K Feb 10 00:09 ngx_http_geoip_module.so
    -rwxr-xr-x.  1 root root 137K Feb 10 00:09 ngx_http_image_filter_module.so
    -rwxr-xr-x.  1 root root 549K Feb 10 00:09 ngx_stream_module.so
    line 20 of nginx.conf is for the stream context setup for redis streams on wordpress auto install routine in centmin.sh menu option 22 for redis at nginx level caching future features on my test private install
    Code:
    stream {
      upstream backend-multi {
        zone     upstream_backend-multi 20m;
        least_conn;
    
    #    server 127.0.0.1:23001;
    #    server 127.0.0.1:23002;
    #    server 127.0.0.1:23003;
    #    server 127.0.0.1:23004;
    
        server 127.0.0.1:6379 weight=1 max_fails=3 fail_timeout=30s;
        server 127.0.0.1:6380 weight=1 max_fails=3 fail_timeout=30s;
        server 127.0.0.1:6381 weight=1 max_fails=3 fail_timeout=30s;
        server 127.0.0.1:6382 weight=1 max_fails=3 fail_timeout=30s;
        server 127.0.0.1:6383 weight=1 max_fails=3 fail_timeout=30s;
        server 127.0.0.1:6384 weight=1 max_fails=3 fail_timeout=30s;
    #    server 127.0.0.1:6382 backup;
    #    server 127.0.0.1:6383 backup;
    #    server 127.0.0.1:6384 backup;
      }
    
      server {
        listen 19001 reuseport backlog=8192;
        proxy_connect_timeout 2s;
        proxy_timeout 5s;
        proxy_pass backend-multi;
      }
    }
    ah might be missing this step
    working now with loaded modules via
    Code:
    load_module "modules/ngx_http_geoip_module.so";
    load_module "modules/ngx_http_image_filter_module.so";
    load_module "modules/ngx_stream_module.so";
     
    Last edited: Feb 10, 2016
    • Informative Informative x 1
  17. eva2000

    eva2000 Administrator Staff Member

    30,175
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    1:22 AM
    Nginx 1.13.x
    MariaDB 5.5
    Updated Centmin Mod 123.09beta01 branch with nginx dynamic module support detection. If nginx version you are attempting to upgrade to via centmin.sh menu option 4 has dynamic module support i.e. nginx 1.9.11, then dynamically configure supporting nginx modules with dynamic flag and setup an include file in /usr/local/nginx/conf/nginx.conf

    in /usr/local/nginx/conf/nginx.conf include file /usr/local/nginx/conf/dynamic-modules.conf is tagged to after pcre_jit option
    Code (Text):
    pcre_jit on;
    include /usr/local/nginx/conf/dynamic-modules.conf;


    then each dynamic module supported nginx module is automatically appended into the /usr/local/nginx/conf/dynamic-modules.conf file to load those modules
    Code (Text):
    cat /usr/local/nginx/conf/dynamic-modules.conf
    load_module "modules/ngx_http_image_filter_module.so";
    load_module "modules/ngx_http_geoip_module.so";
    load_module "modules/ngx_stream_module.so";

    which means to unload a dynamically enabled nginx module, you do not need to recompile nginx, but instead comment out the specific load_mdoule line in /usr/local/nginx/conf/dynamic-modules.conf and restart nginx :)
    Code (Text):
    ls -lah /usr/local/nginx/modules 
    total 824K
    drwxr-xr-x.  2 root root  102 Feb 10 00:09 .
    drwxr-xr-x. 10 root root 4.0K Feb 10 00:01 ..
    -rwxr-xr-x.  1 root root 126K Feb 10 00:40 ngx_http_geoip_module.so
    -rwxr-xr-x.  1 root root 137K Feb 10 00:40 ngx_http_image_filter_module.so
    -rwxr-xr-x.  1 root root 549K Feb 10 00:40 ngx_stream_module.so


    end result is
    this was with 1.9.11 conflicting lua-nginx-module, ngx_brotli and ngx_pagespeed disabled via
    persistent config file /etc/centminmod/custom_config.inc setup for
    Code:
    NGINX_PAGESPEED=n
    NGINX_LIBBROTLI='n'
    LUAJIT_GITINSTALL='n'
    ORESTY_LUANGINX='n'
    
     
    Last edited: Feb 10, 2016
  18. pamamolf

    pamamolf Well-Known Member

    2,724
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    6:22 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    So cool :)
    All modules will be listed in /usr/local/nginx/conf/dynamic-modules.conf or we must add them?

    Let's hope that the broken modules will be fixed soon :)
     
  19. eva2000

    eva2000 Administrator Staff Member

    30,175
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    1:22 AM
    Nginx 1.13.x
    MariaDB 5.5
    they are dynamically added to that include file if the nginx module supports dynamic module loading and i have coded it as such in inc/nginx_configure.inc

    example for image filter, stream and geoip module's support for dynamic loading in inc/nginx_configure.inc commit at update nginx 1.9.11 supported dynamic module routine · centminmod/centminmod@c72eab6 · GitHub
     
  20. pamamolf

    pamamolf Well-Known Member

    2,724
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    6:22 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    But if a module supports dynamic loading and i have it disabled when i upgrade then it will be there but commented?

    Also if new module is out and supports dynamic loading how it will be added on the setup and in the dynamic-modules.conf file?