windows10 - Windows 10 installation nginx error
迷茫
迷茫 2017-05-16 17:12:58
0
4
561

logs bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)

It is found here that system occupies port 80, system is a system process, and cannot be closed. How can we solve it? I tested win7 and it works fine. How do you usually solve it?

Continue above, there is a problem with the configuration, test.conf copy a copy of nginx.conf, the configuration is as follows, why is it requesting www.hht.com (I have configured it in the host here), why is it still port 80, configuration The port inside is 32000,

What is the reason for this?

test.conf


#user  nobody;
worker_processes  1;

error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

pid        logs/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       32000;
        server_name  www.hht.com;
        charset utf-8;
        location / {
            root   deployed;
            index  index.html index.htm;
        }

        error_page  404              /404.html;
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
    server {
        listen       192.168.0.102:33000;
        server_name  www.hhh.com;
        charset utf-8;
        access_log  logs/host.access.log  main;
        location / {
            root   html;
            index  index.html index.htm;
        }
        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

    }



}



##

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(4)
世界只因有你

1. The system application that occupies port 80 may be closed net stop servicename 2. Use another port for nginx to run first before other problems arise (grasping the key points)

洪涛

Check IIS or IIS Express.

给我你的怀抱

The first floor has already made it very clear, but it is strongly recommended to play on Linux. Don’t ask me how I know, it’s all a trap I’ve walked through. . .

左手右手慢动作
  1. Tie to other ports

  2. Check port usage

  3. Use Docker :)

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!