启动Nginx服务失败:Job for nginx.service failed because the control process exited with error code. See \"systemctl status nginx.service\" and \"journalctl -xe\" for details.

主宰稳场 提交于 2019-11-29 13:53:06

首次接触nginx,安装完使用命令 service nignx restart  后,出现这个错误,并按照提示给出的命令查看错误详情  systemctl status nginx.service   :

  

 

 从详情可以看到: (98:address already in use),说明端口已经被占用了,我们来看下是什么东西占用了端口吧:

输入命令:  netstat -apn|grep :80

 

 可以看到13929/httpd服务占用了80端口,需要将这个服务关闭,(我尝试使用kill杀死进程,但是无效)

执行命令:  service httpd stop   来关闭httpd服务

 然后再重启niginx就能启动了:

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!