Solution to Nginx service startup failure

Source: Internet
Author: User

The company's development environment is nginx, and it often encounters some situations where nginx cannot be started. Baidu once, find a method and record it, which is also convenient for people with the same troubles.

Sometimes the Nginx service cannot be started because port 80 is occupied by other applications. In this case, we need to check which program occupies it, which may be a site in IIS or Tomat, apache and so on are all possible. Therefore, we need to check the usage of port 80 on the computer and use the following command:

Netstat-aon | findstr ": 80 & Prime;


At this time, we did not see that the machine is occupied by processes with PID 4, and found it in the task manager.


Shut down the 80 terminal and then run our nginx service.

In addition, we need to know three major commands for nginx:

Start Service: start nginx
Stop Service: nginx-s stop
Reload: nginx-s reload (the configuration file needs to be executed after it is modified)

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.