What are the common commands of nginx?
This article mainly explains "what are the common commands in nginx". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what are the common commands of nginx"?
Nginx supports two command modes, one is the nginx command, which is in the following format:. / ngin-parameter, and the other is the kill command by operating the nginx main process ID
Nginx command
Execute under the nginx/sbin directory:
Sudo. / sbin/nginx # starts. / nginx-v # displays the nginx version. / nginx-V # shows the nginx version, compiler version and configuration parameter-c # specifies a configuration file for Nginx instead of the default conf/nginx.conf./nginx-t # to test the syntax correctness of the configuration file
-s command
. / nginx-s: stop # quickly close the service. / nginx-s: quit # shut down the service calmly # wait for all requests to finish and then shut down the service. / nginx-s: reload # reload the configuration file without stopping service. / nginx-s: reopen # reopen the log # if the log file does not exist, the log file control signal command (kill)
. / logs/nginx.pid file contains the main process number, or you can check the main process number through ps-ef | grep nginx
Kill-HUP main process number # reload configuration file kill-USR1 main process number # reopen the log file # if the log file does not exist, the log file kill-USR2 main process number # smooth upgrade kill-TERM main process number # Quick shutdown # you can also use the kill-INT main process number Kill-9 main process number kill-QUIT main process # calmly shut down the kill-WINCH main process # calmly shut down # wait for all requests to end and shut down the service here I believe that you have a deeper understanding of "what are the common commands in nginx"? you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!