Learn about Centmin Mod LEMP Stack today
Register Now

Nginx 1.25.1 Release - http2 parameter deprecation

Discussion in 'Centmin Mod News' started by eva2000, Jun 14, 2023.

Thread Status:
Not open for further replies.
  1. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    1:50 AM
    Nginx 1.25.x
    MariaDB 10.x
    Nginx 1.25.1 was just released, and it has now deprecated the http2 parameter in Nginx listen directive in favour of using an http2 directive standalone with on/off values.

    So updated Centmin Mod 130.00beta01's centmin.sh menu option 4 nginx upgrade/downgrade routine to auto switch between the two supported http2 parameter (<=1.25.0) and http2 directive (>=1.25.1) methods. You can see the update post and example of changes at https://community.centminmod.com/th...tive-change-in-130-00beta01.23888/#post-96496

    Right now http2 parameter is being deprecated so it still works just nginx -t config test will give you a warning that it is being deprecated. So for now haven't defaulted new Nginx vhost creation to new config format as folks may switch between nginx 1.25.1+ and <1.25.1 versions. So leave the changes to be automated at nginx upgrade time via centmin.sh menu option 4 to auto modify nginx vhosts based off of nginx version detected

    Code (Text):
    nginx -t
    nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /usr/local/nginx/conf/conf.d/domain4.com.ssl.conf:15
    nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

    so for nginx 1.25.1 based vhost listen directives, the eventual change in nginx vhost config file will be from
    Code (Text):
    listen 443 ssl http2;

    Code (Text):
    listen 443 ssl;
    http2 on;

    Centmin Mod Nginx Versions

    Nginx has 2 release branches for stable and mainline. Stable is odd number i.e. 1.18, 1.20, 1.22, 1.24 and mainline is 1.19, 1.21, 1.23, 1.25. Mainline is where bleeding edge features are added and updated frequently for all security and bug fixes. Stable is less frequently updated and only severe bug and security fixes get added. Minor bugs may not be updated in Nginx stable release and will wait for next Nginx mainline branch promotion to stable release for such fixes.

    Centmin Mod Nginx by default follows Nginx mainline version releases. Though Centmin Mod supports end users using Nginx stable or mainline so you can choose 1.24.x or 1.25.x.
Thread Status:
Not open for further replies.