欢迎光临
我们一直在努力

Nginx 启动报错 nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) 解决方案

Nginx 启动报错 nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) 解决方案

1. 问题描述

在 Linux 服务器上启动或重启 Nginx 时,很多人都会撞上下面这行刺眼的报错:

$ systemctl start nginx
Job for nginx.service failed because the control process exited with error code.
See \”systemctl status nginx.service\” and \”journalctl -xe\” for details.

$ nginx -t && nginx
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()

在不同系统上,这个报错还会有几种变体文案:

# macOS / BSD 系统上错误码不是 98,而是 48
nginx: [emerg] bind() to 0.0.0

赞(0)
未经允许不得转载:171主机测评 » Nginx 启动报错 nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) 解决方案
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址