Join the community 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

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    from what i can see eventually nginx folks will be offering a repository of dynamic *.so modules you can drop into /usr/local/nginx/modules and use load_module to load them but yes you still need inc/nginx_configure option to specify --with-modulename=dynamic to load them. So in case of Centmin Mod Nginx, if you disable nginx module via it's option i.e. NGINX_GEOIP=n in persistent config file or centmin.sh, then it won't have a corresponding --with-http_geoip_module=dynamic line, so won't load even if /usr/local/nginx/modules/ has the dynamic module ngx_http_geoip_module.so in there
    would have to be dropped in /usr/local/nginx/modules/ and then inc/nginx_configure.inc needs to be updated for the appropriate --with-modulename=dynamic line

    I can probably add support for custom nginx configure include file which can tag custom nginx module load lines to the existing nginx configure routine, so folks could just add the --with-modulename=dynamic lines as needed :)

     
  2. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Last edited: Feb 10, 2016
  3. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    more info at NGINX Dynamic Modules

    from Converting Static Modules to Dynamic Modules | NGINX

     
    Last edited: Feb 10, 2016
  4. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Last edited: Feb 10, 2016
  5. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Good news for centmin mod 123.09beta01 at least
    1. Piotr fixed ngx_brotli support This isn’t compiling with nginx 1.9.11 · Issue #16 · google/ngx_brotli · GitHub
    2. Charles submitted a pull request for patch work around for lua-nginx-module support in nginx 1.9.11 Nginx 1.9.11 ngx_udp_connection_t => ngx_resolver_connection_t by charlesportwoodii · Pull Request #669 · openresty/lua-nginx-module · GitHub and i added patch support as a temp workaround Beta Branch - add luapatch function for nginx 1.9.11 | Centmin Mod Community
    3. I took an opportunity to also add patch support for lua-nginx 0.10 compatibility Beta Branch - add luaopensslpatch support for lua-nginx-module 0.10+ | Centmin Mod Community :)
    4. so just leaves ngx_pagespeed fixes to come Fix building with nginx 1.9.11+ and support dynamic module loading · Issue #1110 · pagespeed/ngx_pagespeed · GitHub
    nginx 1.9.11 with ngx_brotli and lua nginx 0.9.20 and libressl AND NGINX_PAGESPEED=n
    nginx 1.9.11 with ngx_brotli and lua nginx 0.10 which requires fallback from libressl to openssl AND NGINX_PAGESPEED=n
     
    Last edited: Feb 10, 2016
  6. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  7. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  8. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +162
    Local Time:
    11:02 AM
    latest
    latest
    downloaded the latest beta and I'm on 1.9.11 now
     
  9. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    great !

    Unfortunately for 123.08stable i had to update code to temporarily disable ngx_pagespeed and nginx lua via
    Code:
    ORESTY_LUANGINX='n'
    NGINX_PAGESPEED=n
    as nginx lua 0.10 compatibility and ngx_pagespeed 1.10 branch work arounds don't already exist in 123.08stable that are already in place in centmin mod 123.09beta01

    ngx_pagespeed are only fixing 1.10 branch for nginx 1.9.11 compatibility issues Fix build with nginx-1.9.11+. by PiotrSikora · Pull Request #1114 · pagespeed/ngx_pagespeed · GitHub and 123.08stable isn't ready for 1.10 branch of ngx_pagespeed due to other compatibility issues with higher GCC requirements in ngx_pagespeed 1.10 that CentOS 6 doesn't have out of box. Centmin Mod 123.09beta01 has workarounds but they don't exist in 123.08stable
     
  10. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  11. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    5+ days out till ngx_pagespeed 1.10.33.5 is out with 1.9.11 official support

    Compilation Error · Issue #1117 · pagespeed/ngx_pagespeed · GitHub
     
  12. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    looks like ngx_pagespeed 1.10.33.4 patch doesn't work now on 123.09beta01 and lua nginx 0.9.20 broken but seems lua nginx 0.10.1rc0 was released with nginx 1.9.11 support but lua nginx 0.10 will trigger switch from libressl to openssl 1.0.2f for nginx as lua nginx 0.10 has features only available in openssl but not libressl

    this is latest 123.09beta01 with ngx_pagespeed disabled for now and lua nginx 0.10.1rc0 set via persistent config file at /etc/centminmod/custom_config.inc with:
    Code:
    ORESTY_LUANGINX='y'
    NGINX_PAGESPEED=n
    ORESTY_LUANGINXVER='0.10.1rc0'
    or for now you can disable ngx_pagespeed and nginx lua via persistent config file at /etc/centminmod/custom_config.inc and then recompile nginx 1.9.11 via centmin.sh menu option 4
    Code:
    ORESTY_LUANGINX='n''
    NGINX_PAGESPEED=n
    or in centmin mod 123.09beta01 you set variable in persistent config file for
    Code:
    NGINX_PAGESPEEDGITMASTER=y
    and recompile nginx 1.9.11 via centmin.sh menu option 4

    I fixed a bug for this update inc/downloads.inc · centminmod/centminmod@8ea7f8a · GitHub so you can actually install ngx_pagespeed from github master branch instead of point release versions as master has 1.9.11 fix in it before 1.10.33.5 beta ngx_pagespeed release

    the ngx_pagespeed master code folder is renamed 1.10.33.4 just for cosmetic purposes

    this was with persistent config file /etc/centminmod/custom_config.inc
    Code:
    ORESTY_LUANGINX='n'
    NGINX_PAGESPEED=y
    NGINX_PAGESPEEDGITMASTER=y
    ORESTY_LUANGINXVER='0.10.1rc0'
     
    Last edited: Feb 12, 2016
  13. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Just updated centmin mod 123.09beta01 to disable ngx_pagespeed NGINX_PAGESPEED=n temporarily until 1.10.33.5 ngx_pagespeed is released. As such with ngx_pagespeed 1.10, will auto switch back from clang to using GCC compilar due to ngx_pagespeed 1.10's higher GCC 4.8 requirements that CentOS 6 doesn't mean
     
  14. pamamolf

    pamamolf Well-Known Member

    4,125
    429
    83
    May 31, 2014
    Ratings:
    +841
    Local Time:
    6:02 AM
    Nginx-1.29.x
    MariaDB 10.6.x
    So the only modules that have issues with dynamic support are pagespeed and lua?
     
  15. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    yeah right now lua nginx 0.9.20 is default in centmin mod and not compatible with nginx 1.9.11. Lua 0.10.1rc0 fixes that and works on centmin mod 123.09beta01 but switches back from libressl to openssl for nginx

    ngx_pagespeed 1.10.33.5 release in 5+ days has fix for nginx 1.9.11 but 1.10 branch requires higher GCC 4.8+ version than available on CentOS 6's GCC 4.4.7 so centmin mod 123.09beta01 has work around already to switch to using devtoolset-3 GCC 4.9.1 for CentOS 6 compiles. CentOS 7 default is GCC 4.8.5 so ok with ngx_pagespeed 1.10

    of course for now you can either use nginx 1.9.11 but set persistent config /etc/centminmod/custom_config.inc to
    Code:
    ORESTY_LUANGINX='n'
    NGINX_PAGESPEED=n
    and recompile nginx via centmin.sh menu option 4

    or just stick with nginx 1.9.10 for now
     
    Last edited: Feb 12, 2016
  16. pamamolf

    pamamolf Well-Known Member

    4,125
    429
    83
    May 31, 2014
    Ratings:
    +841
    Local Time:
    6:02 AM
    Nginx-1.29.x
    MariaDB 10.6.x
    When it will be out it will support again libressl?
     
  17. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    probably never as libressl doesn't have the features that openssl 1.0.2+ has which lua 0.10 makes use of 0.10.0 & LibreSSL 2.2.5 ? · Issue #654 · openresty/lua-nginx-module · GitHub

    lua nginx 0.10 adds new lua ssl support GitHub - openresty/lua-nginx-module: Embed the Power of Lua into NGINX HTTP servers
     
  18. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    with lua nginx and ngx_pagespeed disabled on latest 123.09beta01 updated code fresh install seems to have issue with geoip module compiled as dynamic module
    Code:
    nginx -t
    nginx: [emerg] unknown directive "geoip_country" in /usr/local/nginx/conf/geoip.conf:2
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
    Code:
    ls -lah /usr/local/nginx/modules/
    total 820K
    drwxr-xr-x 2 root root  102 Feb 12 07:07 .
    drwxr-xr-x 6 root root   53 Feb 12 07:07 ..
    -rwxr-xr-x 1 root root 126K Feb 12 07:07 ngx_http_geoip_module.so
    -rwxr-xr-x 1 root root 137K Feb 12 07:07 ngx_http_image_filter_module.so
    -rwxr-xr-x 1 root root 549K Feb 12 07:07 ngx_stream_module.so
    edit, looks like /usr/local/nginx/conf/dynamic-modules.conf isn't being included in nginx.conf or being created
    Code:
    cat /usr/local/nginx/conf/dynamic-modules.conf
    cat: /usr/local/nginx/conf/dynamic-modules.conf: No such file or directory
    ah on fresh installs, some of the nginx directories don't exist at nginx configure stage
    Code:
    NGX_DYNAMICCHECK nginx_configure
    /svr-setup/nginx-1.9.11
    
    nginx dynamic module support detected
    
    touch: cannot touch ‘/usr/local/nginx/conf/dynamic-modules.conf’: No such file or directory
    grep: /usr/local/nginx/conf/nginx.conf: No such file or directory
    sed: can't read /usr/local/nginx/conf/nginx.conf: No such file or directory
    sed: can't read /usr/local/nginx/conf/nginx.conf: No such file or directory
    grep: /usr/local/nginx/conf/nginx.conf: No such file or directory
    sed: can't read /usr/local/nginx/conf/nginx.conf: No such file or directory
     
    Last edited: Feb 12, 2016
  19. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    added openresty headers more nginx module dynamic module support optionally via pulling headers more github master code https://community.centminmod.com/posts/26505/

    Code:
    ls -lah /usr/local/nginx/modules
    total 1.1M
    drwxr-xr-x  2 root root 4.0K Feb 14 04:40 .
    drwxr-xr-x 10 root root 4.0K Feb 13 10:20 ..
    -rwxr-xr-x  1 root root 126K Feb 14 04:40 ngx_http_geoip_module.so
    -rwxr-xr-x  1 root root 292K Feb 14 04:40 ngx_http_headers_more_filter_module.so
    -rwxr-xr-x  1 root root 137K Feb 14 04:40 ngx_http_image_filter_module.so
    -rwxr-xr-x  1 root root 549K Feb 14 04:40 ngx_stream_module.so
    and in nginx.conf include file /usr/local/nginx/conf/dynamic-modules.conf
    Code:
    load_module "modules/ngx_http_image_filter_module.so";
    load_module "modules/ngx_http_headers_more_filter_module.so";
    load_module "modules/ngx_http_geoip_module.so";
    load_module "modules/ngx_stream_module.so";
    
    also did same for openresty echo nginx module https://community.centminmod.com/posts/26509/ and set-misc module https://community.centminmod.com/posts/26514/
     
    Last edited: Feb 14, 2016
  20. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    1:02 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Latest Centmin Mod 123.09beta01 LEMP stack's Nginx dynamic module support with dynamic modules loaded from
    /usr/local/nginx/modules
    Code:
    ls -lah /usr/local/nginx/modules
    total 2.7M
    drwxr-xr-x  2 root root 4.0K Feb 14 05:24 .
    drwxr-xr-x 10 root root 4.0K Feb 13 10:20 ..
    -rwxr-xr-x  1 root root 707K Feb 14 05:24 ngx_http_echo_module.so
    -rwxr-xr-x  1 root root 126K Feb 14 05:24 ngx_http_geoip_module.so
    -rwxr-xr-x  1 root root 292K Feb 14 05:24 ngx_http_headers_more_filter_module.so
    -rwxr-xr-x  1 root root 137K Feb 14 05:24 ngx_http_image_filter_module.so
    -rwxr-xr-x  1 root root 837K Feb 14 05:24 ngx_http_set_misc_module.so
    -rwxr-xr-x  1 root root 549K Feb 14 05:24 ngx_stream_module.so
    
    this was with /etc/centminmod/custom_config.inc persistent config file set to below options to enable dynamic module support via master branches of Openresty echo, headers more and set-misc nginx modules
    Code:
    ORESTY_ECHOGIT=y
    ORESTY_HEADERSMOREGIT=y
    ORESTY_SETMISCGIT=y
    NGXDYNAMIC_ECHO=y
    NGXDYNAMIC_HEADERSMORE=y
    NGXDYNAMIC_SETMISC=y
    
    and in nginx.conf include file /usr/local/nginx/conf/dynamic-modules.conf
    Code:
    load_module "modules/ngx_http_image_filter_module.so";
    load_module "modules/ngx_http_headers_more_filter_module.so";
    load_module "modules/ngx_http_set_misc_module.so";
    load_module "modules/ngx_http_echo_module.so";
    load_module "modules/ngx_http_geoip_module.so";
    load_module "modules/ngx_stream_module.so";