码迷,mamicode.com
首页 > Web开发 > 详细

访问nginx发布的web页面出错

时间:2017-06-07 14:31:43      阅读:228      评论:0      收藏:0      [点我收藏+]

标签:服务器   server   nginx   localhost   php-fpm   

操作系统:CentOS release 6.8 (Final)

Web服务器:nginx-1.12.0

PHP版本:PHP Version 5.6.30

前端页面显示下列错误:

技术分享

Nginx的日志显示如下错误:[root@localhost logs]# cat error.log

2017/06/0710:02:42 [error] 2590#0: *132 connect() failed (111: Connection refused) whileconnecting to upstream, client: 192.168.133.1, server: localhost, request:"GET /test.php HTTP/1.1", upstream:"fastcgi://127.0.0.1:9000", host: "192.168.133.128"

2017/06/0710:07:42 [error] 2590#0: *190 connect() failed (111: Connection refused) whileconnecting to upstream, client: 192.168.133.1, server: localhost, request:"GET /index.htm HTTP/1.1", upstream:"fastcgi://127.0.0.1:9000", host: "192.168.133.128"

原因是没有启动PHP服务php-fpm

#/application/php/sbin/php-fpm

建议启动服务器时,即自动启动该服务,建议养成该操作下习惯:

[root@localhost/]# vi /etc/rc.local

/application/php/sbin/php-fpm    #添加该行


本文出自 “sky9890” 博客,请务必保留此出处http://sky9896.blog.51cto.com/2330653/1932994

访问nginx发布的web页面出错

标签:服务器   server   nginx   localhost   php-fpm   

原文地址:http://sky9896.blog.51cto.com/2330653/1932994

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!