nginx下无法打开php,报错[error] 5040#0: *1 connect() failed (111: Connection ref ...
来源:互联网 发布:淘宝买兔子炒了 编辑:程序博客网 时间:2024/06/06 01:16
以下引自stackouverflow-----------------
http://stackoverflow.com/questions/15852884/nginx-connect-failed-error
报错信息如下:
2013/04/06 17:52:19 [error] 5040#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /info.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost:8080"
解决办法:
I resolved it, it was a configuration file issue, I added:
location ~ .php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
原因:
There are some situations when fastcgi_pass 127.0.0.1:9000; is present in server block and is responsible for this error, in such cases you need change it to fastcgi_pass unix:/var/run/php5-fpm.sock;. – Kamil Zieliński Dec 8 '13 at 10:34
This is because php5-fpm now ships with the Unix socket listen = /var/run/php5-fpm.sockenabled in /etc/php5/fpm/pool.d/www.conf instead of the TCP socket listen = 127.0.0.1:9000. This is typically a little faster. (For google search purposes) ubuntu 14.04 nginx php5-fpm 502 Bad Gateway. I have a feeling a lot of people will be needing this in the near future. There are so many tutorials with the old socket in place. – DutGRIFF May 9 at 6:09
0 0
- nginx下无法打开php,报错[error] 5040#0: *1 connect() failed (111: Connection ref ...
- nginx 报错 connect() failed (111: Connection refused) while connecting to upstream
- mongo报错:Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed
- 【解决】Xstart连接服务器桌面报错:Failed to connect to the session manager: IO error occurred opening connection
- Redhat6 虚拟机下启动eth0报错Error: Connection activation failed: Device not managed by NetworkManager
- 虚拟机下启动eth0报错Error: Connection activation failed: Device not managed by NetworkManager
- Redhat6 虚拟机下启动eth0报错Error: Connection activation failed: Device not managed by NetworkManager
- Redhat6虚拟机下启动eth0报错Error: Connection activation failed: Device
- AndroidStudio升级报错:Connection failed (connect timed out). Please check network connection and try ...
- nginx+ Pushion Passenger 报错 connect() to unix:/passenger_helper_server failed
- ERROR: transport error 202: connect failed: Connection timed out
- 【nginx】kevent() reported that connect() failed (61: Connection refused)
- 【nginx】kevent() reported that connect() failed (61: Connection refused)
- 关于android报错 libcore.io.ErrnoException: connect failed: ECONNREFUSED (Connection refused)
- (110) Connection timed out的错HttpClient 每次请求未close导致 Nginx connect failed (110- Connection timed out)
- Gradle 'xxx' project refresh failed Error:Connection timed out: connect
- linxu下php使用pdo-dblib连接mssql报错解决方法 错误信息:SQLSTATE[01002]Adaptive Server connection failed (severity 9)
- 解决php curl 报错:SSL connect error
- 手机浏览器调用手机qq客户端的js
- Oracle开发之分析函数(Top/Bottom N、First/Last、NTile)
- 0531 linux系统command shell(2)
- 准备使用MyBatis进行开发
- c#日期操作
- nginx下无法打开php,报错[error] 5040#0: *1 connect() failed (111: Connection ref ...
- Java中正则表达式的分割案例
- Java常用编码规范
- scrollview + listview 只显示一行的解决办法
- 图像处理珍藏版本汇总
- 跨域问题
- EOFException in RealBufferedSource.readUtf8LineStrict解决方案
- cocos2d-Lua之局部变量与全局变量
- 关于eLTE,你不知道的事