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