In the previous PHP basic tutorial I introduced the NGINX+PHP5 (FASTCGI) installation configuration tutorial, which involved nginx basic operation command-nginx Start command, in order to better let PHP run on Nginx, we need to master some basic Nginx command, such as start, Stop nginx Service command, configuration changes, overload nginx, check nginx configuration file command, and so on, below to detail the meaning of Nginx Basic command and its parameters.
Description: The operating environment of my nginx command is Windows
Nginx command: Start Nginx
After installing Nginx on Windows, we need to start the Nginx service, there are two main ways to start the Nginx Service command line operation, namely
1 |
C:/nginx-0.8.53>nginx.exe |
Or
1 |
C:/nginx-0.8.53>start Nginx |
start nginx Command Description : It is important to note that since the Nginx default port is also port 80, if Apache or IIS service is turned on on your machine at this time, avoid having to shut down IIS or Apache service before starting Nginx. Otherwise, the Nginx Start command will not succeed.
Nginx command: Stop Nginx
There are two main types of commands to stop nginx, namely
1 |
C:/nginx-0.8.53>nginx-s stop |
Or
1 |
C:/nginx-0.8.53>nginx-s quit |
Nginx Stop commands The difference between the stop and quit parameters is that stop is a fast stop nginx, may not save the relevant information, quit is a complete and orderly stop nginx, and save the relevant information.
The effects of Nginx start and stop commands can be observed through the Processes tab in Windows Task Manager.
Additional nginx Command parameters
This command parameter specifies a new nginx configuration file to replace the default Nginx configuration file, if you are not sure whether the new Nginx configuration file syntax is correct, you can use the Nginx command-t parameter to test, the-t parameter means not to run the configuration file, but just the test configuration file, that is,
The difference between the Nginx command parameter V and V
The nginx-v command simply displays Nginx version information (Nginx versions), and nginx-v not only displays Nginx version information, but also displays nginx configuration parameter information.
Overload nginx Command
When you change the Nginx configuration information and need to reload these configurations, you can use this command to overload Nginx
Reopen log File command
At this point, start, stop nginx, view, test nginx configuration files, such as the most basic Nginx command is finished.
The above describes the Nginx command: Start, stop and command parameters in detail, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.