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

posted on 2014-02-25 19:45  南郭先生kaka  阅读(6524)  评论(0编辑  收藏  举报

导航