訪問nginx發布的web頁面出錯

來源:互聯網
上載者:User

標籤:伺服器   server   nginx   localhost   php-fpm   

作業系統:CentOS release 6.8 (Final)

Web伺服器:nginx-1.12.0

PHP版本:PHP Version 5.6.30

前端頁面顯示下列錯誤:

650) this.width=650;" src="https://s4.51cto.com/wyfs02/M02/98/15/wKiom1k3ZRjTzBj8AABRk6-8Kes602.jpg-wh_500x0-wm_3-wmp_4-s_867198442.jpg" title="未命名.JPG" alt="wKiom1k3ZRjTzBj8AABRk6-8Kes602.jpg-wh_50" />

Nginx的日誌顯示如下錯誤:[[email protected] 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

建議啟動伺服器時,即自動啟動該服務,建議養成該操作下習慣:

[[email protected]/]# vi /etc/rc.local

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


本文出自 “sky9890” 部落格,請務必保留此出處http://sky9896.blog.51cto.com/2330653/1932994

訪問nginx發布的web頁面出錯

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.