dongyupan4850 2014-06-04 22:05
浏览 225
已采纳

Apache 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"

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?

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

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

FastCgiExternalServer /vagrant/php5-fcgi -socket /tmp/php5-fpm-vagrant.sock -pass-header Authorization

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>

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

any suggestions would be greatly appreciated

  • 写回答

1条回答 默认 最新

  • douhuan5073 2014-06-10 16:16
    关注

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

    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
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试