我有默认的[www]池启动并运行没有问题。我想再运行一个来分隔另一个站点的流程。
我有以下内容:
/etc/php5/fpm/pool.d/site2.conf
[site2]
user = site2
group = www-data
listen = /var/run/php5-fpm-site2.sock
listen.owner = www-data
listen.group = www-data
/etc/nginx/sites/site.net
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-site2.sock;
fastcgi_index index.php;
include fastcgi_params;
}
套接字/用户确实存在于/ var / run中且所有权/权限都可以,但是当我运行php5-server时,只有默认的www启动而且我得到了
2016/04/26 16:30:24 [error] 27908#0: *35895 connect() to unix:/var/run/php5-fpm-site2.sock failed (111: Connection refused) while connecting to upstream,
您怎么看?
答案 0 :(得分:0)
这是一个php5-fpm进程的问题,由于某种原因主进程被终止所以任何命令都会失败(它根本没有重启)。 所以我修复了:
sudo pkill php5-fpm; sudo service php5-fpm start
有关