LEMPer
LEMPer copied to clipboard
Nginx [warn] 99504#99504: the "listen ... http2" directive is deprecated
trafficstars
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:
- https://forum.hestiacp.com/t/nginx-1-25-1-listen-http2-directive-is-deprecated/9816
- https://github.com/spinupwp/wordpress-nginx/tree/develop