nginx在WINDOWS系统上配置时出现的问题

nginx在WINDOWS系统上配置时按照网上的教程,启动时怎么也无法出现在进程里,如果使用nginx.exe -s reload 重启,每次都出现如下错误:

nginx: [alert] could not open error log file: CreateFile() "logs/error.log" failed (3: The system cannot find the path specified)
2021/08/27 11:23:17 [emerg] 4892#22728: CreateFile() "F:\/conf/nginx.conf" failed (3: The system cannot find the path specified)

nginx的环境变量之前就配置好了,到底是什么原因?

试了多种方法无果后,跑到nginx根目录里面去CMD,再次运行 start nginx.exe 

nginx.exe 终于出现在进程中了。熟悉的 Welcome to nginx! 终于出现了。原来问题就这么简单。

PS:有时候过于信任环境变量也是一种坏事。

你可能感兴趣的:(工具使用,nginx,windows)