Deprecated lines on nginx #144

Closed
opened 2026-04-05 20:25:34 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @ivancarlosti on 1/2/2025

CloudPanel version(s) affected

2.5.0

Description

If you run sudo nginx -t to validate configuration, nginx returns:

nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/custom-domain.conf:4
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/custom-domain.conf:5

It do not impact for now but can impact future versions, need to be fixed.

How to reproduce

Install CloudPanel 2.5.0
Run sudo nginx -t

Possible Solution

Change lines of file /etc/nginx/sites-enabled/custom-domain.conf:

  listen 443 ssl http2;
  listen [::]:443 ssl http2;

to:

  listen 443 ssl;
  listen [::]:443 ssl;
  http2 on;

Additional Context

Also recommended to enable http3 by default

*Originally created by @ivancarlosti on 1/2/2025* ### CloudPanel version(s) affected 2.5.0 ### Description If you run `sudo nginx -t` to validate configuration, nginx returns: ``` nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/custom-domain.conf:4 nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/custom-domain.conf:5 ```` It do not impact for now but can impact future versions, need to be fixed. ### How to reproduce Install CloudPanel 2.5.0 Run `sudo nginx -t` ### Possible Solution Change lines of file `/etc/nginx/sites-enabled/custom-domain.conf`: ``` listen 443 ssl http2; listen [::]:443 ssl http2; ``` to: ``` listen 443 ssl; listen [::]:443 ssl; http2 on; ``` ### Additional Context Also recommended to enable http3 by default
Sign in to join this conversation.