HOME » ドキュメント » KUSANAGI 9コマンド » nginx

nginx

nginx

使用するWebサーバをnginxに切り替えます。また、サービスの再起動を行います。

使用例

kusanagi nginx --use nginx125
kusanagi nginx

オプション

(オプション指定なし)

httpd を使用している場合は、nginx に切り替えます。
既にnginx を起動しているときは、nginxを再起動します。

使用するNGINX

[--use {installed | nginx125 | nginx124}]
廃止オプション
--use nginx123 (9.4.5で廃止)
--use nginx122 (9.4.5で廃止)
--use nginx121 (9.2.10で廃止)
--use nginx120 (9.2.10で廃止)
--use nginx119 (9.0.12で廃止)
--use nginx118 (9.0.12で廃止)

デフォルト : installed

使用するNGINXのバージョンを指定します。それぞれ指定したときは以下のNGINXを起動します。

  • --use installed : 現在インストールされているNGINX
  • --use nginx125 : NGINX 1.25
  • --use nginx124 : NGINX 1.24
  • --use nginx123 (9.4.5で廃止) : NGINX 1.23
  • --use nginx122 (9.4.5で廃止) : NGINX 1.22
  • --use nginx121 (9.2.10で廃止) : NGINX 1.21
  • --use nginx120 (9.2.10で廃止) : NGINX 1.20
  • --use nginx119 (9.0.12で廃止) : NGINX 1.19
  • --use nginx118 (9.0.12で廃止) : NGINX 1.18

設定の再読み込み

[--reload]

既存のセッションを切断することなく設定を再読込します。

設定ファイルのチェック

[--test]

設定ファイルのチェックのみを行います。

設定ファイルの更新

[--update-conf]

NGINX 1.25.1の仕様に合わせて設定ファイルを更新します。

実行例

# kusanagi nginx
nginx: the configuration file /etc/opt/kusanagi/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/opt/kusanagi/nginx/nginx.conf test is successful
Removed /etc/systemd/system/multi-user.target.wants/httpd.service.
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service -> /usr/lib/systemd/system/nginx.service.
nginx completed.