参考文章1:nginx error_log 错误日志配置说明

如图,启动nginx时报错:

[root@RV1126_RV1109:/usr/sbin]# nginx -c  /etc/nginx/nginx.conf
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
2021/10/19 15:42:22 [emerg] 2434#0: mkdir() "/var/tmp/nginx/client-body" failed (2: No such file or directory)

我直接把缺少的文件手动创建了,。。

mkdir xxxx/xxxx/xxx… -p 之类的

touch xxx

reboot后又没了。。。。

看这篇文章说用-t命令能测试nginx,果然,又多输出了一个错误:

[root@RV1126_RV1109:/usr/sbin]# nginx -t
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
2021/10/19 15:49:35 [emerg] 2781#0: mkdir() "/var/tmp/nginx/client-body" failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed
[root@RV1126_RV1109:/usr/sbin]#

看这篇文章说,只有root用户才能使用1024以下的端口,但是我已经是root用户了呀,怎么还是提示我没权限呢?是不是我要把端口80改成1024以上?

20211022

DS的人说,你先killall webs(不要注释/opt/init/run.sh里的deamon),然后再运行/etc/init.d/dS50nginx restart就可以了,

nginx报错:nginx: [alert] could not open error log file: open() “/var/log/nginx/error.log“ failed (2: N相关推荐

  1. nginx 报错 99: Cannot assign requested address

    为什么80%的码农都做不了架构师?>>>    nginx 报错 99: Cannot assign requested address net.ipv4.ip_local_port ...

  2. Nginx报错:nginx: [emerg] CreateFile() nginx.conf“ failed (3: The system cannot find the path specified

    windows下启动nginx报错: nginx: [emerg] CreateFile() "D:\桌面\nginx-1.12.0/conf/nginx.conf" failed ...

  3. [nginx报错]---unknown directive chunkin in /XXXXX/XXXXXX:XX的几种解决方式

    问题: nginx报错:unknown directive "chunkin" in /XXXXX/XXXXXX:XX 解决: 当出现unknown directive,一般有个反 ...

  4. nginx 报错 upstream timed out (110: Connection timed out)解决方案

    nginx 报错 upstream timed out (110: Connection timed out)解决方案 参考文章: (1)nginx 报错 upstream timed out (11 ...

  5. [问题已处理]-[nginx]-nginx 报错 could not build server_names_hash

    nginx 报错 could not build server_names_hash 这边添加了一个比较长的域名  测试nginx配置就报如下错误 在http{}下添加 server_names_ha ...

  6. phpstudy环境下laravel项目,Nginx报错CreateFile failed

    phpstudy nginx环境,nginx报错日志如下: 2020/04/13 15:40:33 [error] 7844#14252: *7 CreateFile() "D:/phpst ...

  7. Nginx报错:Sorry,thepageyouarelookingforiscurrentlyunavailable.Pleasetryagainlater._马立杰_新浪博客...

    Nginx报错:Sorry,thepageyouarelookingforiscurrentlyunavailable.Pleasetryagainlater. 原文链接:http://www.orc ...

  8. nginx报错:nginx: [error] OpenEvent(“Global\ngx_reload_89728“) failed

    nginx报错:nginx: [error] OpenEvent("Global\ngx_reload_89728") failed (2: The system cannot f ...

  9. 调用torchtext报错OSError: libtorch_cpu.so: cannot open shared object file: No such file or directory

    环境 torch版本1.4.0 报错 报错信息如题.调用torchtext报错 OSError: libtorch_cpu.so: cannot open shared object file: No ...

最新文章

  1. 用U盘安装VMware ESXi4
  2. 【原创】Kakfa utils源代码分析(二)
  3. can t connect to mysql server on ‘localhost‘解决方法
  4. flink dataset api使用及原理
  5. 关于Jsp页面的jstl标签的级联属性的异常。
  6. 《Python Cookbook 3rd》笔记(1.5):实现一个优先级队列
  7. okvis odometry的安装与运行
  8. 【JeecgBoot】关于 jeecg-boot 的项目理解、使用心得和改进建议
  9. 三角函数与反三角函数图像
  10. 等距更纱黑体 T SC regular下载
  11. arm架构与体系结构
  12. 物价上涨 下馆子点菜的省钱办法
  13. License information could not be obtained from Elasticsearch due to Error: Request Timeout after 300
  14. ClickHouse快速安装-可视化工具连接-创建第一个ck库表(一)
  15. Hadoop安装教程_单机/伪分布式配置_Hadoop2.6.0/Ubuntu14.04
  16. vue用watch监听属性变化
  17. 计算机曝光模式有哪些,曝光模式_拍摄技巧_太平洋电脑网PConline
  18. 抢手机型ROOT测评 ROOT大师成功率达99%
  19. 漏洞通告 | Oracle发布7月更新, 修复墨云科技报告的高危漏洞
  20. 培育百万开发者,Serverless的主战场

热门文章

  1. 处理程序“PageHandlerFactory-Integrated”在其模块列表中有一个错误模块“ManagedPipelineHandler”...
  2. 开源Linux 3.3内核首次融合Android代码
  3. 一个实现生产和消费的例子(并且使用了接口和反射技术,动态调用方法)小框架...
  4. eclipse java 注释_Eclipse中自动添加注释(两种)
  5. 数据库优化之统计分析实战篇
  6. VF02 会计凭证过账时间
  7. SAP支持包、插件程序和附件
  8. 去除SAP中的一些特殊字符
  9. ALV DataChange EVENT
  10. 用户对OA实施的一些认识误区