nginx报错[error] CreateFile() "D:\Java-windows\nginx-1.16.0/logs/nginx.pid" failed (2: The system cannot find the file specified)
无论是nginx -s stop还是nginx -s reload命令,都会出现这个错误。
解决方法:使用命令创建/logs/nginx.pid文件,命令如下所示:
nginx -c conf/nginx.conf
启动nginx
有很多种方法启动nginx
(1)直接双击nginx.exe,双击后一个黑色的弹窗一闪而过
(2)打开cmd命令窗口,切换到nginx解压目录下,输入命令 nginx.exe 或者 start nginx ,回车即可
检查nginx是否启动成功
(1)直接在浏览器地址栏输入网址 http://localhost:80,回车
(2)可以在cmd命令窗口输入命令 tasklist /fi "imagename eq nginx.exe"
关闭nginx
如果使用cmd命令窗口启动nginx,关闭cmd窗口是不能结束nginx进程的,可使用两种方法关闭nginx
(1)输入nginx命令: nginx -s stop(快速停止nginx) 或 nginx -s quit(完整有序的停止nginx)
(2)使用taskkill: taskkill /f /t /im nginx.exe
nginx报错[error] CreateFile() "D:\Java-windows\nginx-1.16.0/logs/nginx.pid" failed (2: The system cannot find the file specified)的更多相关文章
- Nginx系列(6)- nginx: [error] CreateFile() "D:\nginx-1.20.1/logs/nginx.pid" failed (2: The system cannot find the file specified)
背景 修改nginx配置文件nginx.conf后,想要重启nginx使配置生效.cmd进入nginx安装目录,输入命令: nginx -s reload 报错:nginx: [error] Crea ...
- nginx报错 [error] open() “/usr/local/var/run/openresty.pid” failed (2: No such file or directory)
解决: 服务没有启动 使用start启动服务,因为没有start而直接使用stop或者reload报错这个问题: 如果方法一没有解决,使用方法二:-C 指定配置文件nginx.conf或者weblua ...
- docker login harbor出现的报错Error response from daemon: Get https://172.16.1.99/v1/users/: dial tcp 172.16.1.99:443: getsockopt: connection refused解决方法
出现的问题 [root@master01 ~]# docker login 172.16.1.99 Username: admin Password: Error response from daem ...
- jmeter 报错Error in NonGUIDriver java.lang.IllegalArgumentException: Report generation requires csv output format, check 'jmeter.save.saveservice.output_format' property
设置jmeter报个的时候报下面错 只要细心看问题就是把它jmeter.save.saveservice.output_format'的格式改为csv就对 这个属性是在jmeter.propertie ...
- IDEA报错 Error:(24, 35) java: 常量字符串过长
修改设置
- IDEA中SpringBoot启动报错Error:(11, 39) java: 找不到符号
确保不是依赖没有导入或者编码不对问题后 如果还是不行 可以试试以下方式 解决办法 将图片框中Delegate IDE build 勾选 然后重新启动即可
- Windows下nginx报错解决:CreateFile() "xxx/logs/nginx.pid" failed
写在前面 本文给出Windows下nginx报错:CreateFile() "xxx/logs/nginx.pid" failed 的解决方法并分析了出错原因,其中 xxx 表示n ...
- [nginx报错问题]reload时报错:nginx: [error] invalid PID number "" in ...
错误 第一次探索nginx,执行以下命令时: nginx -s reload 报出错误: nginx: [error] invalid PID number "" in ... * ...
- nginx报错:./configure: error: C compiler cc is not found, gcc 是已经安装了的
源码安装nginx报错,找不到gcc,但是实际上gcc是存在的,如下: # ./configure checking for OS + Linux -.el7.x86_64 x86_64 checki ...
随机推荐
- JavaScript异步编程助手:Promise模式
:Promises是一种令代码异步行为更加优雅的抽象,它很有可能是JavaScript的下一个编程范式,一个Promise即表示任务结果,无论该任务是否完成. 异步模式在Web编程中变得越来越重要,对 ...
- python-笔记(四)函数
一.函数是什么? 函数一次来源于数学,但是编程中的[函数]的概念,与数学中的函数还是有很大的不同的,编程中的函数在英文中也有很多不同的叫法. 在Basic中叫做subroutine(子过程或子程序), ...
- 010-elasticsearch5.4.3【四】-聚合操作【一】-度量聚合【metrics】-min、max、sum、avg、count
一.概述 度量类型聚合主要针对的number类型的数据,需要ES做比较多的计算工作 参考向导:地址 import org.elasticsearch.search.aggregations.Aggre ...
- 四种方法给Vmware虚拟机清理瘦身
随着VMware虚拟机使用时间的增长,其所占用的空间也越来越大,本文来说说怎么给VMware虚拟机占用的空间进行瘦身. **方法一:VMware自带的清理磁盘 **这个方法是VMware自带,具有普适 ...
- 38 是否要使用memory引擎的表
38 是否要使用memory引擎的表 内存表的数据组织结构 create table t1(id int primary key, c int) engine=Memory; create table ...
- Altium Designer chapter8总结
元件库操作中需要注意如下: (1)原理图库:主要分三部分来完成(绘制元件的符号轮廓.放置元件引脚.设计规则检查). (2)多子件原理图库:操作与原理图库基本相同,就是新建part. (3)PCB封装库 ...
- python每日一练:0004题
第 0004 题: 任一个英文的纯文本文件,统计其中的单词出现的个数. import re count = 0 with open('./EnglishText.txt','r') as f: tem ...
- 应用安全 - 软件漏洞 - 泛微OA漏洞汇总
SQL注入 前台SQL注入 用户名:admin' or password like 'c4ca4238a0b923820dcc509a6f75849b' and 'a'='a 密码: 1 验证页面参数 ...
- Mac入门--通过Homebrew安装PHP(新)
1 首先安装homebrew,安装过的话更新 安装:homebrew官网地址:https://brew.sh/index_zh-cn.html.或者直接复制下面代码: /usr/bin/ruby -e ...
- Java相关面试题总结+答案(六)
[Spring/Spring MVC] 90. 为什么要使用 spring? spring 提供了 IOC 技术,spring 容器会帮你管理依赖的对象,从而不需要自己创建和管理依赖对象了,更轻松的实 ...