HOME » ドキュメント » Security Edition コマンド » nginx (Security Edition)

nginx (Security Edition)

nginx

NGINXでリバースプロキスを行い、Webサーバとアプリケーションを別のNGINXで動作させるnginxリバースプロキシ + nginxに切り替えます。また、サービスの再起動を行います。
Webサーバの違いについてはKUSANAGI Security EditionのWebサーバ構成を参照してください。

使用例

kusanagi nginx --use nginx129
kusanagi nginx

オプション

(オプション指定なし)

nginxリバースプロキシ + httpd を使用している場合は、nginxリバースプロキシ + nginx に切り替えます。
既にnginx を起動しているときは、nginxリバースプロキシとnginxを再起動します。

使用するNGINX

[--use {installed | nginx129 | nginx128 | nginx127 | nginx126}]

デフォルト : installed

使用するNGINXのバージョンを指定します。それぞれ指定したときは以下のNGINXを起動します。
リバースプロキシとWebサーバ・アプリケーションのNGINXには同じバージョンが使用されます。
異なるバージョンを指定する場合はkusanagi proxyコマンドを使用してください。
複数のNGINXのバージョンが起動してる場合はいずれかの指定が必須です。
--use、--reload、--test、--status、--showpath は同時に指定できません。

  • --use installed : 現在インストールされているNGINX
  • --use nginx129 : NGINX 1.29
  • --use nginx128 : NGINX 1.28
  • --use nginx127 : NGINX 1.27
  • --use nginx126 : NGINX 1.26

設定の再読み込み

[--reload]

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

設定ファイルのチェック

[--test]

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

ステータスの表示

[--stauts]

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

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

[--showpath]

nginx コマンドのフルパスを表示します。
--use、--reload、--test、--status、--showpath は同時に指定できません。

実行例

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

参考コラム

kusanagi nginx で HTTP/3 に対応する - KUSANAGI Tech Column

超高速CMS実行環境 KUSANAGI
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.