Nginx topic (2)--basic operation

Basic operation of nginx

start operation

Of course, we can only use the -c option to make a configuration file for nginx
. If not specified, the default configuration is used
nginx -c [path]

stop operation

Immediately stop
nginx -s stop
or
smoothly stop
nginx -s quit
or
kill TERM | INT | QUIT PID
or (this is not recommended to stop the service)
kill -9 PID

Graceful restart service

nginx -s reload
or
kill HUP PID

basic instructions

nginx -h: view the help
nginx -v: view the version of nginx
nginx -V: view the version and configuration options of nginx
nginx -t: test the correctness of the configuration file
Nginx -T: test the configuration file and display the configuration file (this command You can quickly view the configuration file)
nginx -q: test the configuration file, but only display the error message
nginx -s: send the signal, detailed below
nginx -p: set the prefix
nginx -c: set the configuration file
nginx -g: append the configuration file path

Guess you like

Origin blog.csdn.net/Artisan_w/article/details/131902705