ITeye博客

nginx pid No such file or directory解决办法

快快乐乐的北斗 · 2017-06-14 11:36 · 服务器 · 企业架构 · Markdown

服务器重启后,有时会需要重新启动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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。