ubuntu 重启 nginx 失败,* Restarting nginx nginx ...fail!
发布日期:2021-08-30 19:27:26 浏览次数:21 分类:技术文章

本文共 335 字,大约阅读时间需要 1 分钟。

 

 
 
 

执行 nginx 重启服务时,提示失败如下:

$ sudo service nginx restart  * Restarting nginx nginx   ...fail!
  • 1
  • 2
  • 3
  • 1
  • 2
  • 3

原因是你配置 nginx 的配置文件出了错误

查找错误,处理方法:

$ sudo nginx -t nginx: [emerg] "location" directive is not allowed here in /etc/nginx/nginx.conf:11 nginx: configuration file /etc/nginx/nginx.conf test failed
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5

根据错误信息,修改对应生的配置文件即可。

转载地址:https://blog.csdn.net/weixin_34049948/article/details/85828046 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:MooseFs-分布式文件系统系列(一)之了解并安装它
下一篇:gulp api

发表评论

最新留言

留言是一种美德,欢迎回访!
[***.207.175.100]2024年04月15日 12时58分30秒