Discover Centmin Mod today
Register Now

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

    55,156
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:15 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Last edited: Feb 10, 2016
  2. ModeltogTossen

    ModeltogTossen I wish I could??

    313
    97
    28
    Dec 20, 2015
    Denmark
    Ratings:
    +143
    Local Time:
    12:15 AM
    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. rdan

    rdan Well-Known Member

    5,449
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    6:15 AM
    Mainline
    10.2
    Not a big deal to me :D
    Since recompiling Nginx is just a matter of 1 minute :D.
     
  4. ModeltogTossen

    ModeltogTossen I wish I could??

    313
    97
    28
    Dec 20, 2015
    Denmark
    Ratings:
    +143
    Local Time:
    12:15 AM
    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

    173
    61
    28
    Nov 16, 2015
    Ratings:
    +229
    Local Time:
    6:15 AM
    1.15.x
    MariaDB 10.3.x
    Finally, I'm looking forward to this improvement.
     
  6. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:15 AM
    1.9.10
    10.1.11
    Waiting absolutely :)
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,156
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:15 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    it's coming [nginx] Dynamic modules.

     
  8. eva2000

    eva2000 Administrator Staff Member

    55,156
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:15 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    more developments nginx: log

     
  9. DroidOne

    DroidOne New Member

    5
    2
    3
    Feb 9, 2016
    Ratings:
    +6
    Local Time:
    12:15 AM
    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
  10. eva2000

    eva2000 Administrator Staff Member

    55,156
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:15 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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
     
  11. DroidOne

    DroidOne New Member

    5
    2
    3
    Feb 9, 2016
    Ratings:
    +6
    Local Time:
    12:15 AM
    1.9
    10.1
    [​IMG]

    Documentation here: Core functionality

    Rejoice :)
     
  12. rdan

    rdan Well-Known Member

    5,449
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    6:15 AM
    Mainline
    10.2
    Updated :D
     
  13. eva2000

    eva2000 Administrator Staff Member

    55,156
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:15 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  14. DroidOne

    DroidOne New Member

    5
    2
    3
    Feb 9, 2016
    Ratings:
    +6
    Local Time:
    12:15 AM
    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:
    12:15 AM
    1.9
    10.1
    Here's som more info on the official blog: Introducing Dynamic Modules in NGINX 1.9.11 - NGINX

     
  16. eva2000

    eva2000 Administrator Staff Member

    55,156
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:15 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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
  17. eva2000

    eva2000 Administrator Staff Member

    55,156
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:15 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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 Premium Member Premium Member

    4,100
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    1:15 AM
    Nginx-1.26.x
    MariaDB 10.6.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

    55,156
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:15 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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 Premium Member Premium Member

    4,100
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    1:15 AM
    Nginx-1.26.x
    MariaDB 10.6.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?