Home > Article > Backend Development > Simple control of Nginx service
Introduction: This article briefly introduces the starting and stopping methods of Nginx.
1. Starting Nginx
Under the Linux platform, to start the Nginx service, you only need to locate the working directory to the Nginx installation directory and execute it directly. As shown in the picture below:
It is not difficult to find that Nginx started with the default configuration has two processes, one is the master process and the other is the worker process.
2. Stopping Nginx
Nginx has two ways to stop, one is quick stop (disconnect all links immediately), the other is gentle stop (keep the current link until it is actively disconnected, and no longer accept new ones during this period) the link to).
Quick stop: (The following figure describes the startup and quick stop process of nginx)
Gently stop: (The following figure describes the startup and gentle stop process of nginx)
In addition to using the stop and quit commands, you can also use the reopen and reload parameters to indicate restart and reload respectively.
Readers can use the following command to view the detailed parameter help information of nginx
<code>[root<span>@localhost</span> sbin]<span># ./nginx -h </span></code>
The execution results are shown in the figure below.
References
1. "Detailed Explanation of Nginx High-Performance Web Server" edited by Miao Ze, Beijing: Electronic Industry Press, 2013.10
The above introduces the simple control of Nginx service, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.