发布于 2016-08-19 11:17:51 | 160 次阅读 | 评论: 1 | 来源: 网友投递

这里有新鲜出炉的Nginx开发从入门到精通,程序狗速度看过来!

Nginx WEB服务器

Nginx 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器。 Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的 Rambler.ru 站点开发的,第一个公开版本0.1.0发布于2004年10月4日。其将源代码以类BSD许可证的形式发布,因它的稳定性、丰富的功能集、示例配置文件和低系统资源的消耗而闻名。


重新启动服务器发现报nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)错误,怎么回事如何解决呢,下面脚本之家小编给大家解答下

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

  [root@localhost sbin]# ./nginx -s reload
  nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)

  解决方法:

  



[root@localhost nginx]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

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

  [root@localhost nginx]# cd logs/

  [root@localhost 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文件已经有了。

以上所述是小编给大家介绍的Nginx启动常见错误及解决方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!



最新网友评论  共有(1)条评论 发布评论 返回顶部
cplnk 发布于2016-09-04 16:59:14
支持(0)  反对(0)  回复

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务