Window nginx has no error at startup, but does not have listen port 80, nginxlisten

Source: Internet
Author: User

Window nginx has no error at startup, but does not have listen port 80, nginxlisten

Always use virtual machines to use web + hostonly;

To test the window system compatibility of a php platform today,

Download Windows-nginx 1.9.1 from the official website;

Decompress the package to the directory,

Run nginx.exe

Access 127.0.0.1 is normal;

Modify nginx. conf and replace all servers {} in it with include./vhost/*. conf;

Create a vhost directory under the conf directory and recompile the server conf file of the site from centos. Modify the directory pointed to by root and save the file;

Use nginx.exe-t to test OK;

Use nginx.exe & to start;

Access via 127.0.0.1 fails to be found;

No port 80 is found when netsat-anb is used;

No error was found during the error. log check. It takes a while. No conclusion is reached;

Nginx. conf must be restored to ensure normal access;

Add include./vhost/*. conf in http;

Accessing 127.0.0.1 again is also normal. That is, access to my site is not acceptable?

Config test also prompts OK;

This is a strange idea. Try to move the conf content in the vhost to nginx. conf;

When you run the config test command, the following message is displayed: nginx: [emerg] the unix domain sockets are not supported on this platform in upstream "unix: /run/php-fpm/php-fpm.sock "in D: \ web \ nginx/conf/nginx. conf: 73

It turns out that the configuration in cenots is invalid in that server, but the error message is not displayed in include, which is caused by ignoring this server;


So here we can draw a conclusion: this should be a bug in the nginx error prompt. However, we are currently configuring nginx as much as possible. no problem with configuration in the main configuration file of conf, and then move it into the sub-file,

The configuration can be completed step by step through the error prompt;

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.