nginx: [error] CreateFile() "D:\software\nginx/logs/nginx.pid" failed (2: The system cannot find the file specified)


D:\software\nginx>nginx -s stop
nginx: [error] CreateFile() "D:\software\nginx/logs/nginx.pid" failed (2: The system cannot find the file specified)

  • 造成这个报错的主要原因是在没有启动nginx的情况下执行了stop或reload命令;这时我们可以使用

    nginx -t
    

    查看运行情况;

D:\software\nginx>nginx -t
nginx: the configuration file D:\software\nginx/conf/nginx.conf syntax is ok
nginx: [emerg] CreateDirectory() "C:/Users/99043/Pictures/yunong/" failed (3: The system cannot find the path specified)
nginx: configuration file D:\software\nginx/conf/nginx.conf test failed

  • 发现是路径的问题,修改后再次查看:

D:\software\nginx>nginx -t
nginx: the configuration file D:\software\nginx/conf/nginx.conf syntax is ok
nginx: configuration file D:\software\nginx/conf/nginx.conf test is successful


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM