启动nginx 报错:Job for nginx.service failed because the control process exited with error code.

启动nginx报错: Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

查看原因: 按照提示,输入命令查看详细错误
在这里插入图片描述

解决方法: 发现端口被占用,centos中查看端口被占用命令为

netstat -lnp | grep 端口号

杀掉进程:ps -9 进程号

杀掉所有80端口的进程:lsof -i :80|grep -v "PID"|awk '{print "kill -9",$2}'|sh

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 程序猿惹谁了 设计师:上身试试 返回首页