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

Posted 1点

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nginx 启动出现 [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or di相关的知识,希望对你有一定的参考价值。

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

 

 

成功 没有问题

以上是关于nginx 启动出现 [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or di的主要内容,如果未能解决你的问题,请参考以下文章

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

nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No

nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No

nginx启动报错:nginx: [error] open() "/var/run/nginx/nginx.pid" failed (2: No such file or dire

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

Nginx 启动报错 (nginx: error while loading shared libraries: XXX: cannot open shared object file: No suc