HOME » Documents » KUSANAGI 9 Commands » nginx

nginx

nginx

Switches the web server you are using to nginx. It will also restart the service.

Example

kusanagi nginx --use nginx127
kusanagi nginx

Options

(No options)

If you are using "httpd", it will switch to "nginx".
If "nginx" is already running, "nginx" will restart.

NGINX Version

[--use {installed | nginx127 | nginx126 | nginx125 | nginx124}]
Discontinued options
--use nginx123 (discontinued as of 9.4.5)
--use nginx122 (discontinued as of 9.4.5)
--use nginx121 (discontinued as of 9.2.10)
--use nginx120 (discontinued as of 9.2.10)
--use nginx119 (discontinued as of 9.0.12)
--use nginx118 (discontinued as of 9.0.12)

Default: installed

Specifies the version of NGINX to be used. When one of the following NGINX is specified, it will start up.

  • --use installed: NGINX currently installed
  • --use nginx127 : NGINX 1.27
  • --use nginx126 : NGINX 1.26
  • --use nginx125 : NGINX 1.25
  • --use nginx124 : NGINX 1.24
  • --use nginx123 (discontinued as of 9.4.5) : NGINX 1.23
  • --use nginx122 (discontinued as of 9.4.5) : NGINX 1.22
  • --use nginx121 (discontinued as of 9.2.10) : NGINX 1.21
  • --use nginx120 (discontinued as of 9.2.10) : NGINX 1.20
  • --use nginx119 (discontinued as of 9.0.12) : NGINX 1.19
  • --use nginx118 (discontinued as of 9.0.12) : NGINX 1.18

Reloading Configuration

[--reload]

Reloads configuration without disconnecting the session.

Checking Configuration File

[--test]

Checks the configuration files only.

Update Configuration File

[--update-conf]

Updates the configuration file to match the NGINX 1.25.1 specifications.

Displaying Status

[--status]

Displays status of NGINX.

Output

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