解决 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 protected] logs]# ls
access.log error.log nginx-access.log nginx_error.log
果然没有/usr/local/nginx/logs/nginx.pid 文件

解决方法:用指定文件加载nginx配置文件
[[email protected] nginx]/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

原文地址:https://www.cnblogs.com/link01/p/12050567.html

时间: 2024-10-14 22:00:33

解决 nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"的相关文章

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

解决:error: Cannot find libmysqlclient_r under /usr/local/mysql.

转 解决:error: Cannot find libmysqlclient_r under /usr/local/mysql. 配置php的时候出现以下问题解决方案 checking for MySQL support... yeschecking for specified location of the MySQL UNIX socket...nochecking for MySQL UNIX socket location... noconfigure: error: Cannot fi

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: [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 "/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: [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  解决方法:找

touch: cannot touch '/usr/local/tomcat/logs/catalina.out': Permission denied解决方法

logs目录没有创建修改权限 ./startup.sh Using CATALINA_BASE:   /usr/local/tomcat702 Using CATALINA_HOME:   /usr/local/tomcat702 Using CATALINA_TMPDIR: /usr/local/tomcat702/temp Using JRE_HOME:        /usr/java/jdk1.6.0_24 Using CLASSPATH:       /usr/local/tomcat