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 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料