解决nginx启动失败

nginx启动时报错:启动失败

nginx: [error] CreateFile() "C:\web\nginx-1.17.9/logs/nginx.pid" failed (2: The system cannot find the file specified)

执行命令 nginx -t 查询nginx的配置

C:\web\nginx-1.17.9>nginx.exe -t
nginx: the configuration file C:\web\nginx-1.17.9/conf/nginx.conf syntax is ok
nginx: [emerg] bind() to 0.0.0.0:8090 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)
nginx: configuration file C:\web\nginx-1.17.9/conf/nginx.conf test failed

问题大概如上

 

其中问题:  80端口被占用了

10013: An attempt was made to access a socket in a way forbidden by its access permissions

解决办法:

cmd  输入  netstat -aon | findstr :80

输入  tasklist|findstr "15616"

找到任务管理器 -- 详细信息

手动关闭

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值