Start
Assuming Nginx is installed in the/usr/local/nginx/directory, the command to start Nginx is:
/usr/local/nginx/sbin/nginx - c /usr/local/nginx/conf/nginx.conf
The parameter "-C" specifies the path to the configuration file, and if you do not add the "-C" parameter, Nginx will load the nginx.conf file in the Conf subdirectory of its installation directory by default.
Stop it
Nginx Stop method has many kinds, generally by sending the system signal to the NGINX main process way to stop nginx.
To find Nginx main process number:ps -ef |grep nginx
(1) calmly stop nginx:kill - QUIT 主进程号
(2) Quick Stop Nginx:kill - TERM 主进程号
(3) Force stop all Nginx processes:pkill -9 nginx
Smooth restart of Nginx
If the Nginx configuration file is changed to restart Nginx, the same can be done by sending the system signal to the Nginx master process. However, before restarting, verify that the nginx.conf syntax is correct, otherwise nginx will not load the new configuration file. Determine if the Nginx configuration file is correct (note the installation path of your server Nginx):
/usr/local-t-c /usr/local/nginx/conf/nginx/conf
If the configuration file is correct, it will prompt "... syntax is OK"
This time you will be smooth restart Nginx:kill -HUP 主进程号
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the Nginx start, stop, smooth restart, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.