解决Job for nginx.service failed because the control process exited with error code
问题
systemctl restart nginx.service
重启提示:
Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journalctl -xe” for details.
解决方法
nginx配置文件有错误
运行下面命令查看修改
nginx -t
检查端口是否被占用
检查nginx是否已经启动
ps -aux | grep nginx
如果已经启动使用下面命令干掉即可
pkill -9 nginx