关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

云服务器重启nginx后丢失nginx.pid问题处理

发布时间:2020/2/25 14:06:17
香港云服务器

使用nginx -s reload的时候出现:

[error]: invalid PID number “” in “/var/run/nginx.pid”

网上找的的解释:

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

在我机器上是这样的nginx -c /usr/local/nginx/conf/nginx.conf