请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

启动Nginx服务失败,错误日志如下,请老师帮忙看下是什么原因?

[root@www yum]# systemctl status nginx
● nginx.service - nginx - high performance web server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 四 2019-05-09 19:07:29 CST; 43s ago
     Docs: http://nginx.org/en/docs/
  Process: 3593 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)

5月 09 19:07:26 www.apachetest.com nginx[3593]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address alr...use)
5月 09 19:07:27 www.apachetest.com nginx[3593]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address alr...use)
5月 09 19:07:27 www.apachetest.com nginx[3593]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address alr...use)
5月 09 19:07:28 www.apachetest.com nginx[3593]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address alr...use)
5月 09 19:07:28 www.apachetest.com nginx[3593]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address alr...use)
5月 09 19:07:29 www.apachetest.com systemd[1]: nginx.service: control process exited, code=exited status=1
5月 09 19:07:29 www.apachetest.com nginx[3593]: nginx: [emerg] still could not bind()
5月 09 19:07:29 www.apachetest.com systemd[1]: Failed to start nginx - high performance web server.
5月 09 19:07:29 www.apachetest.com systemd[1]: Unit nginx.service entered failed state.
5月 09 19:07:29 www.apachetest.com systemd[1]: nginx.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

倒数第4行和倒数第6行是报错加粗的部分。

正在回答

1回答

你好

bind() to 0.0.0.0:80 failed (98: Address alr...use)

说明已经有个服务已经占用了80端口。

 执行 如下命令看谁占用了

netstat -anpl |grep 80  

1 回复 有任何疑惑可以回复我~
  • 提问者 刘大鱼 #1
    感谢,是httpd服务忘了关了,关掉httpd服务再启动就OK了
    回复 有任何疑惑可以回复我~ 2019-05-10 15:29:05
问题已解决,确定采纳
还有疑问,暂不采纳
快速上手Linux 玩转典型应用
  • 参与学习       1663    人
  • 解答问题       572    个

以主流CentOS 7 操作系统为例,系统讲解Linux,真实线上环境助你快速上手,独立配置运维服务器

了解课程
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号