問題
修改nginx.conf配置后,輸入sbin/nginx -s reload,結果報錯nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)
解決辦法
網上的辦法,大多針對“nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)”
說實話,可能有用,但是我這改了好久都不行,,,
我的問題是nginx.conf組態檔寫錯了,并不是在其他的地方去作修改

如圖,root后面應該是 /data/www/KeyProject,而我寫的是data/www/KeyProject,它報錯的位置沒有準確道這一行,所以我找了半天都沒發現,這是個大坑呀,,,
Nginx.conf檔案一定得小心,它報錯的位置不一定準確
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/200578.html
標籤:其他
下一篇:日記(一)
