解决nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误

重新启动服务器,访问web服务发现无法浏览啦!登陆服务器之后进到nginx使用./nginx -s reload重新读取配置文件,发现报nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)错误,进到logs文件发现的确没有nginx.pid文件

[[email protected] sbin]# ./nginx -s reload

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

解决方法:

[[email protected] nginx]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

使用nginx -c的参数指定nginx.conf文件的位置

[[email protected] nginx]# cd logs/

[[email protected] logs]# ll

总用量 12

-rw-r--r-- 1 root root 1246 12月  9 18:10 access.log

-rw-r--r-- 1 root root  516 12月 10 15:39 error.log

-rw-r--r-- 1 root root    5 12月 10 15:38 nginx.pid

看nginx.pid文件已经有了。

时间: 2024-12-13 09:10:19

解决nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误的相关文章

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] 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

aclocal: error: aclocal: file '/usr/local/share/aclocal/wxwin.m4' does not exist

1. 查找wxwin.m4文件 mdfind -name wxwin.m4 2. 删除/usr/local/share/aclocal/wxwin.m4,建立软连接 cd /usr/local/share/aclocal/ rm wxwin.m4 ln -s /usr/local/*/**/***l/wxwin.m4 wxwin.m4 aclocal: error: aclocal: file '/usr/local/share/aclocal/wxwin.m4' does not exist

解决Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid

重新启动服务器,访问web服务发现无法浏览啦!登陆服务器之后进到nginx使用./nginx -s reload重新读取配置文件,发现报nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)错误,进到logs文件发现的确没有nginx.pid文件 [[email protected] sbin]# ./nginx -s reload nginx: [err

Linux Centos 启动mysql ERROR * The server quit without updating PID file (/usr/local/mysql/data/mysql.pid).

做了一些尝试:比如kill -9 进程id  发现根本就杀不死. 查看ERROR.LOG 2015-12-07 18:50:08 29710 [ERROR] /usr/local/mysql/bin/mysqld: unknown variable 'scripts/mysql_install_db --user=mysql' 第一感觉:百度了下.大部分都是说安装的时候有这个问题:感觉场景不太一样:回到原点继续想: scripts/mysql_install_db --user=mysql --

linux下安装mysql问题总结(一)mysqld_safe mysqld from pid file /usr/local/mysql/data/mysql.pid ended

linux下安装mysql数据库 linux版本:CentOS release 6.8 (Final) mysql版本:mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz 在安装数据库过成中,输入启动mysql命令:/usr/local/mysql/support-files/mysql.server start 报错信息如图: 进入/usr/local/mysql/data目录下查看报错日志: 经在网上查找解决方案,折腾了一翻还是不行,后来发现在初始化数据库步骤

java.io.FileNotFoundException: /usr/local/hadoop/logs/fairscheduler-statedump.log(权限不够)解决方案

问题描述:Linux虚拟机内使用hadoop 解决方案: 1 $ su 2 密码:****** 3 # chown hadoop 文件名 进入超级管理员,为hadoop用户分配该文件的权限. 完美解决: 原文地址:https://www.cnblogs.com/mawangwang/p/11218709.html

NGINX由入门到精通:编译安装nginx

一.环境准备1.系统和内内核版本 [[email protected] ~]# cat /etc/redhat-release CentOS release 6.8 (Final) [[email protected] ~]# uname -r 2.6.32-642.el6.x86_64 2.主机名称和IP地址 [[email protected] ~]# hostname  linux-node1.ourplm.com [[email protected] ~]# hostname -I 19