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

nginx重启报错:nginx: [error] invalid PID number "" in "/run/nginx.pid"

问题描述:执行 nginx -t 是OK的,然而在执行 nginx -s reload 的时候报错

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

解决办法

    需要先执行

    nginx -c /etc/nginx/nginx.conf

    nginx.conf文件的路径可以从nginx -t的返回中找到。

    nginx -s reload

原文地址:https://blog.51cto.com/13293070/2440960

时间: 2024-11-08 18:04:52

nginx: [error] invalid PID number "" in "/run/ngin的相关文章

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

在Mac上用brew安装Nginx,然后修改Nginx配置文件,再重启时报出如下错误: nginx: [error] invalid PID number "" in "/usr/local/var/run/nginx/nginx.pid" 解决办法: $ sudo nginx -c /usr/local/etc/nginx/nginx.conf $ sudo nginx -s reload

nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"

   系统版本:CentOS 6.5 x86_64     nginx版本:Nginx-1.6.1 今天在测试升级nginx版本到nginx-1.7.0的时候,有点小小的插曲,报错了nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid",在此记录以下加强记忆的同时,也避免以后再出现类似错误. Step1. 升级完毕后,进行了重启(也可执行kill -QUIT 主进程号) St

nginx: [error] invalid PID number问题处理

再启动nginx服务时,无法正常启动,报错误信息如下nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid" 解决方法: /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 使用nginx -c的参数指定nginx.conf文件的位置然后再重新启动,解决问题,可以通过ps -ef|grep nginx

nginx: [error] invalid PID number

一.检查nginx配置文件语法有无错误 [[email protected] conf]# /application/nginx/sbin/nginx -tnginx: the configuration file /application/nginx-16.0/conf/nginx.conf syntax is ok nginx: configuration file /application/nginx-16.0/conf/nginx.conf test is successful 二.平滑

解决 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"

使用/usr/local/nginx/sbin/nginx -s reload 重新读取配置文件出错 [[email protected] nginx]/usr/local/nginx/sbin/nginx -s reload提示 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid" [[email protected] nginx]# cd logs[[email pro

nginx: [error] invalid PID number "" in "/usr/local/webserver/nginx/logs/nginx.pid"

进入nginx文件下,例如 :/usr/local/nginx/sbin [[email protected] /]# cd /usr/local/nginx/sbin 运行命令: [[email protected] /]# ./nginx -c /usr/local/webserver/nginx/conf/nginx.conf 重新加载: [[email protected] /]# ./nginx -s reload 原文地址:https://www.cnblogs.com/gyrgyr

nginx在reload时候报错invalid PID number

今天在nginx重新加载配置文件的时候报错 提示无效的PID,打开nginx.pid文件,发现里面是空的,在网上找了下,有的说sudo可以解决,但是又一次失望了 1 2 [[email protected]_23_56 conf]# sudo /usr/local/nginx/sbin/nginx -s reload nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid" 于

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

nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory) 2017年09月14日 09:15:45 阅读数:7742 启动Nginx出现这个错误 nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory) 1  解决方法:找

nginx错误:invalid PID number

今天修改了nginx的反向代理配置文件 然后 /usr/local/nginx/sbin/nginx -s reload 的时候出现了以下错误 解决办法: 原文地址:http://blog.51cto.com/zhangcf/2091592