重启nginx时报错

                                                重启nginx时报错

错误:

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

现在假设你是这样操作的:
你修改了/etc/nginx/conf.d/default.conf文件,兴高采烈的保存了,然后兴高采烈的运行了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.
心儿哇凉的你搜索了Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
按照首页的很多办法试图解决,都失败了,你有点悲痛欲绝了,直到看到这个问题下的采纳答案,你仿佛看到了希望,于是你搜索了/usr/lib/systemd/system 目录下的nginx.service ,找到了。。看来这个答案也没能帮到你,你变得绝望,就在你即将放弃的那一刹那,你看到了这个答案,没错。就是你正在看着的这个答案:

一切的一切在你修改/etc/nginx/conf.d/default.conf文件的那一刻,都已注定:你修改的语句末尾少了分号;或者是注释影响的;

加上分号,:wq保存,运行systemctl restart nginx.service

你运行了systemctl restart nginx.service,成功!仿佛时光倒流,人群逆行,你又回到了最初的起点,那时的你兴高采烈。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值