Learn about Centmin Mod LEMP Stack today
Register Now

http2 directive is deprecated nginx

Discussion in 'Bug Reports' started by adamus007p, Jul 5, 2025.

  1. adamus007p

    adamus007p Member

    378
    20
    18
    Feb 8, 2019
    Ratings:
    +39
    Local Time:
    11:42 AM
    Please fill in any relevant information that applies to you:
    • CentOS Version: i.e.AlmaLinux9
    • Centmin Mod Version Installed: i.e. 1132.00stable fresh installation
      Code (Text):
      cminfo versions
    Code (Text):
     cminfo versions
    
    1st:
    132.00stable.b091 #Mon Jun 30 06:27:09 PM CEST 2025
    ..
    last 10:
    132.00stable.b091 #Tue Jul  1 05:30:38 PM CEST 2025
    132.00stable.b091 #Tue Jul  1 05:33:05 PM CEST 2025
    132.00stable.b091 #Tue Jul  1 05:35:40 PM CEST 2025
    132.00stable.b091 #Tue Jul  1 05:38:09 PM CEST 2025
    132.00stable.b091 #Tue Jul  1 05:40:39 PM CEST 2025
    132.00stable.b091 #Tue Jul  1 05:43:09 PM CEST 2025
    132.00stable.b091 #Tue Jul  1 05:45:39 PM CEST 2025
    132.00stable.b091 #Tue Jul  1 05:48:14 PM CEST 2025
    132.00stable.b091 #Tue Jul  1 05:51:28 PM CEST 2025
    132.00stable.b091 #Tue Jul  1 05:54:06 PM CEST 2025
    
    [18:22][root@host ~]#


    I do know why it show only that and several times.


    but

    Code (Text):
    nginx -V
    nginx version: nginx/1.27.5 (300625-183529-almalinux9-kvm-ba2e74a-br-a71f931)
    built with OpenSSL 3.2.2 4 Jun 2024
    TLS SNI support enabled
    



    Code (Text):
    nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /usr/local/nginx/conf/conf.d/--dns_cf.ssl.conf:17
    nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /usr/local/nginx/conf/conf.d/domain1.com.ssl.conf:13
    nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /usr/local/nginx/conf/conf.d/domain2.com.ssl.conf:13
    nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /usr/local/nginx/conf/conf.d/domain3.com.ssl.conf:13




    I read that Nginx 1.25.1+ Listen ... http2" directive is deprecated

    in /usr/local/nginx/conf/conf.d/ configs are with
    Code (Text):
    server {
      listen 443 ssl http2 reuseport;
     
  2. duderuud

    duderuud Active Member

    320
    97
    28
    Dec 5, 2020
    The Netherlands
    Ratings:
    +217
    Local Time:
    11:42 AM
    1.29 x
    11.4
    Change
    Code (Text):
    server {
      listen 443 ssl http2 reuseport;
    

    to
    Code (Text):
    server {
      listen 443 ssl reuseport;
      http2 on;
    
     
  3. adamus007p

    adamus007p Member

    378
    20
    18
    Feb 8, 2019
    Ratings:
    +39
    Local Time:
    11:42 AM
    Thank you @duderuud, this is the the website which I have send. I wanted to more highlite this warning to @eva2000 to correct it in the template.
     
  4. eva2000

    eva2000 Administrator Staff Member

    59,560
    12,539
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,180
    Local Time:
    7:42 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  5. atomi

    atomi Member

    41
    11
    8
    Jul 14, 2018
    Ratings:
    +27
    Local Time:
    12:42 PM
    1.29.x
    10.6
    I just installed yet another CMM server and noticed that default this is still giving error eventho you use:
    Code:
    NGINX_VERSION='1.29.4'
    in custom_config.inc at initial install. Its kinda useless to use menu option 4 to upgrade nginx version again just to get these nginx templates working properly. Some debug if it matters

    Code:
    System Up Since:     2026-01-17 15:34:20
     System Uptime:     up 10 hours, 26 minutes
     Server Type:         kvm
     CentOS Version:     8.10
     Centmin Mod:         140.00beta01.b283
     Nginx Version:     1.29.4 (170126-105241-almalinux8-kvm-ac40c68)
     
  6. eva2000

    eva2000 Administrator Staff Member

    59,560
    12,539
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,180
    Local Time:
    7:42 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Cheers thanks for heads up will need to check how the issue rears up only on initial nginx install and not nginx upgrades via centmin.sh menu option 4