KUSANAGI コマンド

httpd-behind-nginx

httpd-behind-nginx

httpd-behind-nginx

WebサーバとアプリケーションをApache httpdで動作させつつ、NGINXでリバースプロキスを行うことでnginxの機能を併用できるモード httpd-behind-nginx に切り替えます。また、サービスの再起動を行います。

このモードではApache httpdとNGINXの両方が実行されます。
nginxと同様に、fcacheとratelimitを利用できます。また、NGINX 1.25.1以降ではHTTP/3を利用できます。
NGINXのバージョンを変更するには、nginxコマンドでバージョンを変更した後にhttpd-behind-nginxを実行します。
Apache httpdのWAFを利用できます。
Apacheのバージョンを変更するには、httpdコマンドでバージョンを変更した後にhttpd-behind-nginxを実行します。

Apache httpdとNGINXの両方のログが出力されますので、高負荷な環境ではログの容量に注意してください。
NGINXはHTTPとHTTPSの両方のアクセスログに出力されますが、Apache httpdはHTTPのアクセスログのみ出力されます。

※PSTのプロファイルはhttpd-behind-nginxに対応していません。
httpd-behind-nginxではPSTが無効になります。また、WEXAL managerも利用できません。

使用例

kusanagi httpd-behind-nginx
kusanagi httpd-behind-nginx --reload

オプション

(オプション指定なし)

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

設定の再読み込み

[--reload]

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

設定ファイルのチェック

[--test]

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

ステータスの表示

[--stauts]

Apache httpdとNGINXのステータスを表示します。

実行例

# kusanagi httpd-behind-nginx
nginx: the configuration file /etc/opt/kusanagi/nginx/nginx-with_httpd.conf syntax is ok
nginx: configuration file /etc/opt/kusanagi/nginx/nginx-with_httpd.conf test is successful
Removed /etc/systemd/system/multi-user.target.wants/nginx.service.
Created symlink /etc/systemd/system/multi-user.target.wants/nginx@with_httpd.service -> /usr/lib/systemd/system/nginx@.service.
nginx completed.
Syntax OK
Created symlink /etc/systemd/system/multi-user.target.wants/httpd@with_nginx.service -> /usr/lib/systemd/system/httpd@.service.
httpd completed.
httpd-behind-nginx completed.
超高速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.