nginx: [error] CreateFile() “D:\nginx-1.20.1/logs/nginx.pid“ failed (2: The system cannot find the
下载解压完nginx后,双击nginx.exe后访问http://127.0.0.1/,能够出现欢迎界面
但是在命令行关闭nginx服务时(nginx -s quit),报错nginx: [error] CreateFile() “D:\nginx-1.20.1/logs/nginx.pid” failed
根据报错信息来看,在nginx安装目录下的logs文件中找不到nginx.pid文件,去对应文件查看,发现确实没有该文件
解决办法:
在任务管理器强制关闭nginx进程,
然后再在命令行中重新用start nginx命令启动,
现在发现在nginx安装目录下的logs文件中出现了nginx.pid文件,
再用命令nginx -s quit正常关闭nginx进程,
此时无法访问http://127.0.0.1/,成功关闭nginx
原因分析:
nginx在启动或重启时要杀掉之前的nginx进程,就需要通过nginx.pid来找到原来的进程,而nginx.pid存储的就是原来的进程id。没有进程id系统就无法找到原来的nginx进程,自然就无法关闭了
之后测试无论是双击nginx.exe还是cmd命令启动nginx,都会自动在logs文件下配置nginx.pid文件,均可正常关闭。不懂为啥第一次就不行呢?
nginx: [error] CreateFile() “D:\nginx-1.20.1/logs/nginx.pid“ failed (2: The system cannot find the相关推荐
- nginx: [emerg] CreateFile() “D:\soft\nginx-1.18.0/logs/nginx.pid“ failed (5: Access is denied)
win10启动nginx报错 nginx: [emerg] CreateFile() "D:\soft\nginx-1.18.0/logs/nginx.pid" failed (5 ...
- nginx: [error] CreateFile() “D:\nginx-1.21.6/logs/nginx.pid“ failed (2: The system cannot find the
问题描述 nginx: [error] CreateFile() "D:\nginx\nginx-1.21.6\nginx-1.21.6/logs/nginx.pid" faile ...
- nginx.pid failed (2: The system cannot find the file specified
nginx.pid" failed (2: The system cannot find the file specified nginx -c conf/nginx.conf nginx常 ...
- Windows:nginx: [error] CreateFile() “/logs/nginx.pid“ failed (2: The system)
先看下报错信息 这是我Nginx的第一个小坑,其实这个也算不上坑,就是不知道Nginx的加载规则. 原因:你的Nginx并未启动,所以无法加载配置文件 解决方案: 第一步:你需要先启动你的Nginx( ...
- 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 ...
- windows安装nginx莫名其妙 CreateFile()权限不够创建问题
报错: C:\Users\Administrator>nginx nginx: [alert] could not open error log file: CreateFile() " ...
- nginx报错:nginx: [alert] could not open error log file: open() “/var/log/nginx/error.log“ failed (2: N
参考文章1:nginx error_log 错误日志配置说明 如图,启动nginx时报错: [root@RV1126_RV1109:/usr/sbin]# nginx -c /etc/nginx/ng ...
- 解决nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误
[root@localhost sbin]# ./nginx -s reload nginx: [error] open() "/usr/local/nginx/logs/nginx.pid ...
- 解决Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid
解决Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid 重新启动服务器,访问web服务发现无法浏览啦!登陆服务器之后进到nginx使用./ng ...
- nginx: [error] invalid PID number in /run/nginx.pid
在重启云主机(系统)之后,执行 nginx -t 是OK的,然而在执行 nginx -s reload 的时候报错 nginx: [error] invalid PID number "&q ...
最新文章
- Python 核心设计理念27个问题及解答
- php的yii简介,yii
- CodeForces616:Educational Round 5
- 尊重用户,提升产品欢迎度
- 阿里云业绩同比增126% 云服务现“3A鼎立”
- uva 550 有趣的乘法(dfs)
- oracle 多表视图更新
- reduce端的连接实现
- Windows 使用windump进行循环抓包
- Linux下利用ioctl函数获取网卡信息
- Java通过GeoLite2-City.mmdb进行IP信息查询地理定位和经纬度
- 白话大数据--Hash分片
- 支配树 / Dominator_Tree(待补)
- c语言中输入n一个整数存入一维数组,编写程序输入n个整数到一维数组(先输入数据的个数n,再输入n个数据),然后以输入的顺序输出这些数。...
- 甲骨文官网下载jdk历史版本
- 高等数学学习笔记——第八讲——数列极限的性质(2.数列极限的四则运算法则)
- 参考文献格式详细解释和引用(常见)
- UltraISO打开Ubuntu镜像ISO文件只有EFI文件夹
- 关于Java的位移运算
- 工业4.0中的人-信息-物理系统集成(HSI):设计与评估方法