nginx出现[error] invalid PID number ““ in “/run/nginx.pid“的错误

修改nginx配置文件重启时,出现如下错误

nginx: [error] invalid PID number "" in "/run/nginx.pid"

检查语法是对的

[root@peipei conf]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

解决方法

  • killall
[root@peipei conf]# killall nginx
[root@peipei conf]# nginx
[root@peipei conf]# ps aux|grep nginx
root     12251  0.0  0.0 105500  1988 ?        Ss   19:53   0:00 nginx: master process nginx
nginx    12252  0.0  0.0 105968  2980 ?        S    19:53   0:00 nginx: worker process
nginx    12253  0.0  0.0 105968  2980 ?        S    19:53   0:00 nginx: worker process
root     12262  0.0  0.0 112708   988 pts/0    S+   19:54   0:00 grep --color=auto nginx


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值