Nginx command: Start, stop and command parameters

Source: Internet
Author: User
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

1

Nginx-c

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,

1

Nginx-t-C

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

1

Nginx-s Reload

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

1

Nginx-s Reopen

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.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.