Apache的FastCGI的服务器连接失败

Apache的FastCGI的服务器连接失败

本文介绍了Apache的FastCGI的服务器连接失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Debian的虚拟机底箱喘息,我一直在使用与,在过去数个月无任何问题,但是昨天,当我提出了一个新的机器和更新/升级包,我开始得到一个FastCGI的服务器连接失败错误:

I have a virtual machine base box for Debian wheezy that I've been using with vagrant for the last few months without any issues, however yesterday when I brought up a new machine and updated/upgraded packages I started getting a FastCGI server connection failure error:

[Wed Jun 04 14:39:03 2014] [error] [client 10.0.2.2] (13)Permission denied: FastCGI: failed to connect to server "/vagrant/php5-fcgi": connect() failed
[Wed Jun 04 14:39:03 2014] [error] [client 10.0.2.2] FastCGI: incomplete headers (0 bytes) received from server "/vagrant/php5-fcgi"

我能解决这个问题暂时通过手动触摸和chmodding /tmp/php5-fpm-vagrant.sock ,但我的问题是,为什么它开始发生的所有突然?

I am able to resolve the issue temporarily by manually touching and chmodding /tmp/php5-fpm-vagrant.sock, but my question is why did it start happening all of a sudden?

个人preferences不谈,有什么功能毛病我的配置:

Personal preferences aside, is there anything functionally wrong with my configuration?:

在我的Apache网站上提供我有一个名为 000php 包含文件:

In my apache sites available I have a file called 000php containing:

FastCgiExternalServer /游民/ PHP5-FCGI -socket /tmp/php5-fpm-vagrant.sock -pass头授权

因为Apache负荷按字母顺序排列的网站,这总是最先被加载,那么我有一个名为流浪汉另一个文件包含:

Since apache loads sites alphabetically, this always gets loaded first, then I have another file called vagrant that contains:

<VirtualHost *:80 *:8080>
   DocumentRoot /vagrant/public_html/
   ServerName vagrant.localhost

   <Directory /vagrant/>
      AllowOverride all
   </Directory>

   AddHandler php5-fcgi .php
   Action php5-fcgi /php5-fcgi
   Alias /php5-fcgi /vagrant/php5-fcgi

   ErrorLog ${APACHE_LOG_DIR}/vagrant_error.log
   CustomLog ${APACHE_LOG_DIR}/vagrant_access.log combined
</VirtualHost>

和一个名为PHP的FPM池的配置 vagrant.conf ,看起来像这样:

and a php fpm pool config called vagrant.conf that looks like this:

[vagrant]
listen = /tmp/php5-fpm-vagrant.sock

listen.allowed_clients = 127.0.0.1

user = vagrant
group = vagrant

pm = ondemand
pm.max_children = 50

任何建议将不胜AP preciated

any suggestions would be greatly appreciated

推荐答案

想通了答案,这是通过的

Figured out the answer, this was caused by https://bugs.php.net/bug.php?id=67060

此修复程序是以下行添加到我的 vagrant.conf PHP FPM配置文件并重新启动PHP FPM,重载是不够的。

The fix was to add the following lines to my vagrant.conf php fpm configuration file and restart php fpm, a reload was not enough

listen.owner = www-data
listen.group = www-data
listen.mode = 0660

这篇关于Apache的FastCGI的服务器连接失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 17:23