search

Home  >  Q&A  >  body text

windows10 - Windows 10 installation nginx error

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;
        }

    }



}



##

迷茫迷茫2753 days ago593

reply all(4)I'll reply

  • 世界只因有你

    世界只因有你2017-05-16 17:14:58

    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)

    reply
    0
  • PHP中文网

    PHP中文网2017-05-16 17:14:58

    Check IIS or IIS Express.

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-16 17:14:58

    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. . .

    reply
    0
  • ringa_lee

    ringa_lee2017-05-16 17:14:58

    1. Tie to other ports

    2. Check port usage

    3. Use Docker :)

    reply
    0
  • Cancelreply