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