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

2016年8月24日09:56:37网站建设来源:破洛洛评论1,117

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

[root@localhost sbin]# ./nginx -s reload文章源自堕落的鱼-https://www.duoluodeyu.com/2360.html

nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)文章源自堕落的鱼-https://www.duoluodeyu.com/2360.html

解决方法:文章源自堕落的鱼-https://www.duoluodeyu.com/2360.html

[root@localhost nginx]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf文章源自堕落的鱼-https://www.duoluodeyu.com/2360.html

使用nginx -c的参数指定nginx.conf文件的位置文章源自堕落的鱼-https://www.duoluodeyu.com/2360.html

[root@localhost nginx]# cd logs/文章源自堕落的鱼-https://www.duoluodeyu.com/2360.html

[root@localhost logs]# ll文章源自堕落的鱼-https://www.duoluodeyu.com/2360.html

总用量 12文章源自堕落的鱼-https://www.duoluodeyu.com/2360.html

-rw-r--r-- 1 root root 1246 12月 9 18:10 access.log文章源自堕落的鱼-https://www.duoluodeyu.com/2360.html

-rw-r--r-- 1 root root 516 12月 10 15:39 error.log文章源自堕落的鱼-https://www.duoluodeyu.com/2360.html

-rw-r--r-- 1 root root 5 12月 10 15:38 nginx.pid文章源自堕落的鱼-https://www.duoluodeyu.com/2360.html

看nginx.pid文件已经有了。文章源自堕落的鱼-https://www.duoluodeyu.com/2360.html

匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定