KUSANAGI コマンド Security Edition コマンド

nginx

nginx

nginx

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

使用例

kusanagi nginx --use nginx127
kusanagi nginx

オプション

(オプション指定なし)

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

使用するNGINX

[--use {installed | nginx127 | nginx126 | nginx125 | nginx124}]
廃止オプション
--use nginx125 (Security Editionで廃止)
--use nginx124 (Security Editionで廃止)
--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、--reload、--test、--update-conf、--status、--showpath は同時に指定できません。

  • --use installed : 現在インストールされているNGINX
  • --use nginx127 : NGINX 1.27
  • --use nginx126 : NGINX 1.26
  • --use nginx125 (Security Editonで廃止) : NGINX 1.25
  • --use nginx124 (Security Editonで廃止) : 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]

既存のセッションを切断することなく設定を再読込します。
--use、--reload、--test、--update-conf、--status、--showpath は同時に指定できません。

設定ファイルのチェック

[--test]

設定ファイルのチェックのみを行います。
--use、--reload、--test、--update-conf、--status、--showpath は同時に指定できません。

設定ファイルの更新

廃止オプション
[--update-conf (Security Editionで廃止)]

NGINX 1.25.1の仕様に合わせて設定ファイルを更新します。
--use、--reload、--test、--update-conf、--status は同時に指定できません。

ステータスの表示

[--stauts]

NGINXのステータスを表示します。
--use、--reload、--test、--update-conf、--status、--showpath は同時に指定できません。

nginx コマンドのフルパスを表示

[--showpath]

※このオプションはKUSANAGI Security Editionのみ利用可能です。
nginx コマンドのフルパスを表示します。
--use、--reload、--test、--status、--showpath は同時に指定できません。

実行例

# 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.