window上使用以下命令启动nginx报错

nginx: [alert] could not open error log file: CreateFile() "logs/error.log" fail
ed (3: The system cannot find the path specified)
2022/04/24 20:57:16 [warn] 2880#1980: the "ssl" directive is deprecated, use the
 "listen ... ssl" directive instead in D:\nginx-1.18.0/conf/proxy-to-http.conf:53
2022/04/24 20:57:16 [emerg] 2880#1980: CreateFile() "D:\nginx-1.18.0/logs/access
.log" failed (3: The system cannot find the path specified)

nginx -c ./conf/nginx.conf
1.先检查下当前执行命令所在位置,还不行的话
解决办法:
删除logs下的所有文件再执行以上命令

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐