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

1.nginx 启动出现:

2.打开nginx.conf配置文件,把下面红色部分打开,重启服务器或者重新加载配置文件,这样nginx.pid路径就更改成功!

3. 在sbin/ 路径下执行  ./nginx -c /usr/local/nginx/conf/nginx.conf

出现问题

这个问题是端口被占用

根据Nginx配置文件查看配置的端口(本文中使用的是80端口),然后根据端口查看端口占用情况

使用kill命令杀死占用进程,之后重新启动Nginx

kill -9 12256

重新启动nginx

成功 没有问题

原文地址:https://www.cnblogs.com/guangzhou11/p/12364300.html

时间: 2024-11-09 18:19:26

nginx 启动出现 [error] open() "/usr/local/nginx/logs/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)

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: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)

问题场景 服务器重启后,重启nginx时报错nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory),进入到logs目录发现确实没有nginx.pid文件 解决办法 使用指定nginx.conf文件的方式重启nginx /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf还有一种可能就

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

服务器重启后,重启nginx时报错nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory),进入到logs目录发现确实没有nginx.pid文件 cd /usr/local/nginx/sbin/ ./nginx -s reload ngx_http_fastdfs_set pid=1412 ngx_http_fastdfs_set pid=1412 ngx

nginx 首旅之坑(/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory))

第一次按教程安装nginx ,启动NGINX时出错,百度解决方法如下: ========================= 需要停止或者重启nginx的命令如下 /usr/local/nginx/sbin/nginx -s stop /usr/local/nginx/sbin/nginx -s reload 发现报以下错误: nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file o

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

在重启nginx服务的时候,出现了这个错误. [[email protected] etc]# nginx -c /var/run/nginx/nginx.pid nginx: [emerg] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory) 解决办法: [[email protected] etc]# nginx -c /etc/nginx/nginx.conf 其他的一些解决办法: 1.进

-bash: /usr/local/Java/jdk1.8.0_241/bin/java: No such file or directory

错误: [[email protected] Java]# java -version -bash: /usr/local/Java/jdk1.8.0_241/bin/java: No such file or directory 原因:64位操作系统装了32为,重新装一个64位即可,在Linux中64位只能装64位 Linux中查看位数的命令: [[email protected] ~]# getconf LONG_BIT 64 [[email protected] ~]# 原文地址:http

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: [emerg] unknown directive “ ” in /usr/local/nginx/nginx.conf.conf:xx报错处理

当我们在修改Nginx的配置文件,然后加载配置文件./nginx -s reload   报错类似的错误, nginx: [emerg] unknown directive “ ” in /usr/local/nginx/nginx.conf.conf:xx报错处理 那么,大多数我们就是配置刚刚写的这句代码的时候,多打了个空格,细心找一下,重写下就ok了! 原文地址:https://www.cnblogs.com/arebirth/p/errornginx01.html

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目录下查看报错日志: 经在网上查找解决方案,折腾了一翻还是不行,后来发现在初始化数据库步骤