IT评测·应用市场-qidao123.com技术社区

标题: nginx报错:nginx: [alert] could not open error log file: open() “/usr [打印本页]

作者: 饭宝    时间: 2024-8-18 08:17
标题: nginx报错:nginx: [alert] could not open error log file: open() “/usr
错误信息:
  1. nginx: [alert] could not open error log file: open() "/usr/local/nginx/logs/error.log" failed (2: No such file or directory)
  2. 2016/09/13 19:08:56 [emerg] 6996#0: open() "/usr/local/nginx/logs/access.log" failed (2: No such file or directory)
复制代码

分析缘故原由
缘故原由分析:nginx/目录下没有logs文件夹

解决方案
创建文件夹并授权
  1. mkdir logs
  2. chmod 700 logs
复制代码

验证
输入以下下令
  1. /usr/local/nginx/objs/nginx -t
复制代码

正常情况的信息输出:
  1. nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
  2. nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
复制代码
 

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 IT评测·应用市场-qidao123.com技术社区 (https://dis.qidao123.com/) Powered by Discuz! X3.4