ubuntu12.04安装php5
在ubuntu12.04中安装配置LNMP时 出现在php5-fpm的错误 2013/04/26 04:01:05 [crit] 6119#0: *4 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 159.53.110.141, server: 216.238.8
在ubuntu12.04中安装配置LNMP时 出现在php5-fpm的错误
2013/04/26 04:01:05 [crit] 6119#0: *4 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 159.53.110.141, server: 216.238.88.42, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "216.238.88.42:9090
nginx中是这样配置的
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
#
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
我个人的配置是想用sock的方法 毕竟sock方式对于高并发来说 还是比使用cgi方式好的
问题其实出现在 fastcgi_pass得配置上面。在ubuntu 12.10安装了php5-fpm之后。我们可以去
/etc/php5/fpm/pool.d/www.conf
里面找到这样一段代码:
listen = 127.0.0.1:9000
在这上面代码的下面添加一行:
listen = /var/run/php5-fpm.sock
保存后启动php5-fpm
/etc/init.d/php5-fpm restart
这时就可以正常访问了
推荐阅读
-
Premiere CC 2019图文安装和注册补丁的使用方法
-
T20天正建筑5.0最新版无限使用一键破解安装教程(附补丁下载)
-
google浏览器安装插件的图文方法介绍
-
ACDSee Ultimate/Pro 2019专业版/旗舰版安装激活破解教程(附注册码)
-
Alien Skin Exposure X4+Bundle注册破解详细安装教程(附破解下载)
-
森林插件Itoo Forest Pack Pro for 3ds Max2019破解版详细安装教程(附下载)
-
Alien Skin Exposure x3 汉化破解版详细安装图文步骤
-
Python的Flask框架的简介和安装方法
-
Python下的常用下载安装工具pip的安装方法
-
Vmware 7.1.x安装时出现的"already installed"错误解决方法