nginx启动失败

nginx启动失败(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))

在Windows安装了下nginx启动失败,报错nginx: [emerg] 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)

原来是nginx listen的80端口被占用

1、cmd输入命令netstat -aon|findstr “80”

打开cmd

输入命令: netstat -aon|findstr "80" 查询谁占了80端口

C:\Users\x1c>netstat -aon|findstr "80"
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 7532
TCP 0.0.0.0:902 0.0.0.0:0 LISTENING 4780
TCP 0.0.0.0:912 0.0.0.0:0 LISTENING 4780
TCP 0.0.0.0:6800 0.0.0.0:0 LISTENING 10844
TCP 0.0.0.0:8082 0.0.0.0:0 LISTENING 12892
TCP 127.0.0.1:10808 0.0.0.0:0 LISTENING 13880

2.、查看80端口 7532对应的任务

输入命令: tasklist|findstr "7532"

C:\Users\x1c>tasklist|findstr "7532"
nginx.exe 7532 Console 1 7,440 K

原来是我之前打开过nginx程序占用了80端口,那就去关掉

3、结束对应任务

结束任务7532.

4、去启动nginx

打开cmd,去对应的nginx目录,启动nginx

浏览器输入localhost



启动成功

或者是 System 占用的80端口

C:\Users\x1c>netstat -aon|findstr "80"
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4
TCP 0.0.0.0:902 0.0.0.0:0 LISTENING 4780
TCP 0.0.0.0:912 0.0.0.0:0 LISTENING 4780
TCP 0.0.0.0:6800 0.0.0.0:0 LISTENING 10844
TCP 0.0.0.0:8082 0.0.0.0:0 LISTENING 12892
TCP 127.0.0.1:6804 127.0.0.1:3462 TIME_WAIT 0
TCP 127.0.0.1:10808 0.0.0.0:0 LISTENING 13880
TCP 192.168.124.12:6135 221.181.72.102:80 CLOSE_WAIT 15692
C:\Users\x1c>tasklist|findstr "80"
smss.exe 380 Services 0 708 K
csrss.exe 580 Services 0 3,508 K
svchost.exe 888 Services 0 32,580 K
winlogon.exe 880 Console 1 7,164 K
LPlatSvc.exe 1780 Services 0 4,236 K
ibmpmsvc.exe 1796 Services 0 4,080 K
igfxCUIService.exe 2300 Services 0 5,380 K
svchost.exe 2800 Services 0 7,188 K
svchost.exe 3284 Console 1 16,808 K
vmware-authd.exe 4780 Services 0 8,056 K

这个有可能是 IIS服务 占用80端口 ,那就去尝试关闭IIS服务。

启动IIS服务 net start w3svc

关闭IIS服务 net start w3svc

以管理员身份运行cmd,

输入命令net start w3svc

关闭IIS服务了,那就可以去尝试启动下nginx,看是否是IIS占用了80端口

可以执行nginx.exe 那就是IIS占用了80端口。

nginx启动失败(bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket...permissions)的更多相关文章

  1. nginx启动失败/报错(bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket...permissions) nginx启动失败

    出现这个问题是因为80端口被占用了 1.cmd输入命令netstat -aon|findstr "80" 2..查看80端口 16356对应的任务 输入命令 tasklist|fi ...

  2. nginx.exe启动错误: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)

    启动nginx.ese之后 nginx: [emerg] bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a soc ...

  3. Nginx系列(5)- nginx: [emerg] 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)

    启动Windows版本的Nginx时候,cmd报错,报错信息为[emerg] 4276#4280: bind() to 0.0.0.0:80 failed(10013: An attempt was ...

  4. window下运行nginx出现nginx: [emerg] 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)

    做谷粒学院项目,用nginx出现nginx: [emerg] bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a s ...

  5. Nginx启动报错:10013: An attempt was made to access a socket in a way forbidden

    Nginx在win7,win2008下启动报错:bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket i ...

  6. 解决Nginx启动失败

    一.Nginx下载http://nginx.org/en/download.html 二.Nginx启动失败原因1.本人下载的是nginx-1.12.1(稳定版),下载完解压后,进入路径中,start ...

  7. Starting nginx: nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied) nginx 启动失败

     Starting nginx: nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied)     nginx 启动失败 ...

  8. Win7 Nginx启动失败 cmd命令失败

    Win7  Nginx启动失败 cmd命令失败 Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服 ...

  9. 解决GitLab的Forbidden和Nginx启动失败

    通过宝塔安装的GitLab突然出现Forbidden,原因居然是IP并发过大,IP被禁 解决方法: 登录服务器,编辑文件 /etc/gitlab/gitlab.rb  ,将下面的截图内容放开注释(默认 ...

随机推荐

  1. MySQL 5.7.29安装配置

    一.环境准备(关闭防火墙) 1.清除已安装数据库 [root@mysql01 ~]# rpm -qa | grep mariadb mariadb-libs-5.5.35-3.el7.x86_64 [ ...

  2. 【Electron Playground 系列】窗口篇

    作者:Kurosaki 本文主要讲解Electron 窗口的 API 和一些在开发之中遇到的问题. 官方文档 虽然比较全面,但是要想开发一个商用级别的桌面应用必须对整个 Electron API  有 ...

  3. JavaSE20-线程&同步

    1.线程 1.1 基本概念 线程的概念 线程(Thread)是操作系统能够进行运算调度的最小单位.它被包含在进程之中,是进程中的实际运作单位.一条线程指的是进程中一个单一顺序的控制流,一个进程中可以并 ...

  4. C语言服务器编程必备常识

    入门 包含了正确的头文件只能编译通过,没链接正确的库链接会报错. 一些常用的库gcc会自动链接. 库的缺省路径/lib /usr/lib /usr/local/lib 不知道某个函数在那个库可以nm ...

  5. 【Azure Service Bus】 Service Bus如何确保消息发送成功,发送端是否有Ack机制 

    问题描述 Service Bus如何确保消息发送成功,发送端是否有Ack机制(是否有回调API告诉发送端,服务端已经收到消息)?根据对.NET发送Service Bus消息代码的分析,发送方法queu ...

  6. 精尽Spring MVC源码分析 - LocaleResolver 组件

    该系列文档是本人在学习 Spring MVC 的源码过程中总结下来的,可能对读者不太友好,请结合我的源码注释 Spring MVC 源码分析 GitHub 地址 进行阅读 Spring 版本:5.2. ...

  7. windows服务器安装exe文件出错

    今天在安装exe文件的时候出现了错误,记录如下: 服务器环境为windows 2016数据中心标准英文版.要安装的软件为***.exe.按照在本地电脑上安装的方法,直接双击打开,然后错误出现如下图: ...

  8. C# 编译机器码过程原理之再谈反射

    一.引言 我们知道在Java中有虚拟机,代码运行时虚拟机把Java语言编译成与机器无关的字节码,然后再把字节码编译成机器指令执行,那么在.NET中程序是如何运行的呢? 其实运行原理是一样的,.NET中 ...

  9. Powerdesigner中表导出sql语句关于字段注释乱码的问题

    问题说明 注释中的汉字都变成了?,应该是编码的问题. declare @CurrentUser sysname select @CurrentUser = user_name() execute sp ...

  10. 企业运维案例:xxx is not in the sudoers file.This incident will be reported” 错误解决方法

    CentOS6系统下,普通用户使用sudo执行命令时报错: xxx is not in the sudoers file.This incident will be reported" 解决 ...