Skip to content

Nginx [warn] 99504#99504: the "listen ... http2" directive is deprecated #171

@joglomedia

Description

@joglomedia
root@www:~# nginx -t
2024/07/06 09:14:28 [warn] 99504#99504: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/00-default:150
2024/07/06 09:14:28 [warn] 99504#99504: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/00-default:151
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

the old format is

server {
    listen      90.91.45.3:443 ssl http2;

and the new format for nginx >= 1.25.1 is

server {
    listen      90.91.45.3:443 ssl;
    http2  on;

Ref:

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions