nginx

nginxをアップデート後、起動するものの再起動時にエラーをはいていることに気づきました。

nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/*****.conf:6

listen … http2ディレクティブはNGINX 1.25.1で非推奨になりました。

該当行を以下の用に修正します。

listen 443 ssl http2;

listen 443 ssl;

に修正。

HTTP/2を有効にする場合は個別に以下のように設定。

listen 443 ssl;
http2 on;

沢山のconfファイルを一気に書き変えたい場合は以下を実行。

sed -i 's/443 ssl http2/443 ssl/gI' *.conf