nginx重启没法找到PId的解决办法

 

nginx中止的时候,出现了以下错误nginx

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

缘由是把nginx进程杀死后pid丢失了,下一次再开启nginx,使用 -s reload找不到pid文件。server

 

解决办法,参考blog

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)it

因而我用了这方法,也就是nginx -c /path/to/config/filesed

在我机器上是这样的/export/server/nginx/sbin/nginx -c /export/server/nginx/conf/nginx.conffile

相关文章
相关标签/搜索