nginx
Switches the web server you are using to "nginx reverse proxy + nginx", where the NGINX handles reverse proxying, and both the Web server and applications run on the separate NGINX. It will also restart the service.
For details on the differences between Web servers, please refer to the KUSANAGI Security Edition Web Server Configurations.
Example
kusanagi nginx --use nginx129
kusanagi nginx
Options
(No options)
If you are using "nginx reverse proxy + httpd", it will switch to "nginx reverse proxy + nginx".
If "nginx" is already running, "nginx reverse proxy + nginx" will restart.
NGINX Version
[--use {installed | nginx129 | nginx128 | nginx127 | nginx126}]
Default: installed
Specifies the version of NGINX to be used. When one of the following NGINX is specified, it will start up.
The same version of NGINX is used for reverse proxying and Web server/applications.
To specify different versions of NGINX, use kusanagi proxy command.
If multiple versions of NGINX is already running, this option is mandatory.
"--use", "--reload", "--test", "--status" and "--showpath" cannot be specified at the same time.
- --use installed: NGINX currently installed
- --use nginx129 : NGINX 1.29
- --use nginx128 : NGINX 1.28
- --use nginx127 : NGINX 1.27
- --use nginx126 : NGINX 1.26
Reloading Configuration
[--reload]
Reloads configuration without disconnecting the session.
"--use", "--reload", "--test", "--status" and "--showpath" cannot be specified at the same time.
Checking Configuration File
[--test]
Checks the configuration files only.
"--use", "--reload", "--test", "--status" and "--showpath" cannot be specified at the same time.
Displaying Status
[--status]
Displays status of NGINX.
"--use", "--reload", "--test", "--status" and "--showpath" cannot be specified at the same time.
Displaying Full Path of nginx Command
[--showpath]
Displays the full path of nginx command.
"--use", "--reload", "--test", "--status" and "--showpath" cannot be specified at the same time.
Output
# 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.