Solution for failure to start nginx server under win7 due to port occupation

Source: Internet
Author: User


The nginx server cannot be started under Windows 7 due to port occupation. Today, I want to learn about the nginx server, and I don't want to go to linux (the OS is Windows 7). For convenience, I just want to try it in this book. I don't want to configure it on the company's linux server, because I just want to train my trainer for the first time. So to the official website under a window version of nginx, version for the nginx-1.0.9, but the operation is found to be unable to start. Download nginx-1.0.9.zip and decompress it to a directory. Then run the mongonginx.exe file, but the prototype cannot be started. After running the file, the interface will flash through. Failed to run because of unknown reasons. Www.2cto.com is known only when the day or dos starts nginx. By default, nginx monitors port 80, but this port is occupied by other programs: the error message displayed when running nginx under DOS: check the error message % NGINX_HOME % \ logs \ error in the daily file. log knows that the port is occupied and cannot be started, so you can directly use the nginx more monitoring port. I will temporarily modify the external 8011. then start it again. Modify the file to love you % NGINX_HOME % \ conf \ nginx. conf, find the listen in the Server project, and change the default port 80 to any unused port, such as 8011. For example, after the startup is successful, access to the local port 8011 is displayed. If you see welcome to nginx! .
Author: xieyanhua

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.