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