nginx重啟無法找到PId的解決辦法


 

nginx停止的時候,出現了如下錯誤

nginx: [error] open() "/export/servers/nginx/logs/nginx.pid" failed (2: No such file or directory)

原因是把nginx進程殺死后pid丟失了,下一次再開啟nginx,使用 -s reload找不到pid文件。

 

解決辦法,參考

http://blog.csdn.net/jk0803_wantao/article/details/9468535

 

ginx -s reload is only used to tell a running nginx process to reload its config. After a stop, you don't have a running nginx process to send a signal to. Just run nginx (possibly with a -c /path/to/config/file)

於是我用了這方法,也就是nginx -c /path/to/config/file

在我機器上是這樣的/export/server/nginx/sbin/nginx -c /export/server/nginx/conf/nginx.conf


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM