"listen ... http2" directive is deprecated

Using to `nginx 1.25.1` to check the config the following warnings are thrown:

```
/etc/nginx/conf.d # nginx -t
2023/08/04 13:53:03 [warn] 69#69: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/listen_ssl.active:1
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/listen_ssl.active:1
2023/08/04 13:53:03 [warn] 69#69: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/listen_ssl.active:2
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/listen_ssl.active:2
```

This fix results in the following output, fixing the issue:
```
/etc/nginx/conf.d # nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
```
This commit is contained in:
clydegale 2023-08-04 13:59:56 +02:00 committed by GitHub
parent d6c3c58f42
commit 6caa1bcdd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1,2 +1,3 @@
listen ${HTTPS_PORT} ssl http2; listen ${HTTPS_PORT} ssl;
listen [::]:${HTTPS_PORT} ssl http2; listen [::]:${HTTPS_PORT} ssl;
http2 on;