nginx pid No such file or directory解決辦法

服務器重啓後,有時會需要重新啓動nginx,採用

nginx -s reload 

 提示

nginx: [error] open() "/var/run/nginx.pid" failed (2: No such file or directory)

 是因爲服務器重啓時丟了pid文件。

這種情況下可以使用nginx -c,具體如下(nginx.conf位置自行替換)

nginx -c /etc/nginx/nginx.conf

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章