Window nginx starts with silent error, but does not listen to port 80

WBOY
Release: 2016-08-08 09:23:05
Original
1075 people have browsed it

I have been using virtual machines to use the web+hostonly method;

Today, in order to test the window system compatibility of a PHP platform,

downloaded the official version of window-nginx 1.9.1;

Extract it to the directory,

run nginx .exe

Access to 127.0.0.1 is normal;

So I modified nginx.conf, deleted all server{} and replaced it with include ./vhost/*.conf;

Create the vhost directory in the conf directory and copy it from centos Create a site's server conf file and modify the directory pointed to by root. Save;

Use nginx.exe -t to test and everything is OK;

Use nginx.exe & start;

Use 127.0.0.1 to access and find that it is inaccessible;

Using netsat -anb, no error was found on port 80;

Looking at error.log, no error was found. It took a long time and there was no conclusion;

I had to restore nginx.conf, and the access was normal;

Simply go to http again {}Add include ./vhost/*.conf inside;

It is normal to access 127.0.0.1 again. But it doesn’t work even when accessing my site?

config test also indicates that it is OK;

It’s strange, suddenly On a whim, try moving the conf content in vhost into nginx.conf;

As soon as you move it, use config test to test and it will prompt: nginx: [emerg] the unix domain sockets are not supported on this platform in upstream "unix:/run /php-fpm/php-fpm.sock" in D:webnginx/conf/nginx.conf:73

It turns out that the original configuration under cenots in that server is invalid, but when I put it in include, I can't see the error message. And it is caused by this server being ignored;

So here is the conclusion: This should be a bug in the nginx error message, but we are currently in the configuration process, try to configure the main configuration file of nginx.conf and there is no problem, and then move it in By dividing files into files,

we can use error prompts to complete the configuration step by step;

The above introduces the silent error when window nginx starts, but does not listen to port 80, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!