nginx常见错误及解决方法介绍


本文摘自PHP中文网,作者V,侵删。

nginx中常见的错误及解决方法有:

报错一:

1

nginx: [error] CreateFile() "C:\mytools\nginx-1.8.1/logs/nginx.pid" failed (2: The system cannot find the file specified)

或者

1

nginx: [error] Open() "C:\mytools\nginx-1.8.1/logs/nginx.pid" failed

解决方法:

使用命令创建/logs/nginx.pid文件

1

nginx -c conf/nginx.conf

报错二:

1

2

nginx: [alert] could not open error log file: CreateFile() "logs/error.log" failed (3: The system cannot find the path specified)

 [emerg] : invalid number of arguments in "root" directive in C:\mytools\nginx-1.8.1\conf\nginx.conf:45

解决方法:

配置文件root指定一个目录的时候最末尾不能是"\"。

相关推荐:nginx教程

以上就是nginx常见错误及解决方法介绍的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

nginx是什么,做什么用的?

nginx如何隐藏index.php

nginx如何启动

如何修改nginx的运行端口

centos系统下nginx启动不了怎么办

nginx与php的两种通信方式是什么

探讨openresty和nginx的共享内存区使用物理内存资源(或 ram)?

nginx如何实现端口转发

执行nginx命令提示找不到命令怎么解决

如何将nginx注册为服务

更多相关阅读请进入《nginx》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...