libapache2-mod-fastcgi安装期间出错

时间:2015-11-24 18:29:05

标签: php apache2 fastcgi

我尝试安装php5-fpm,但目前在尝试安装libapache2-mod-fastcgi安装时遇到困难。

我收到以下消息:

After this operation, 250 kB of additional disk space will be used.
Selecting previously unselected package libapache2-mod-fastcgi.
(Reading database ... 63345 files and directories currently installed.)
Preparing to unpack .../libapache2-mod-fastcgi_2.4.7~0910052141-1.1_amd64.deb ...
Unpacking libapache2-mod-fastcgi (2.4.7~0910052141-1.1) ...
Setting up libapache2-mod-fastcgi (2.4.7~0910052141-1.1) ...
apache2_invoke: Enable module fastcgi
Action 'configtest' failed.
The Apache error log may have more information.
apache2_reload: Your configuration is broken. Not restarting Apache 2

我会很快发布我的apache日志,因为它是一个大文件,我需要先解析它。

顺便说一下我做的很快:

grep -RIs "FastCgiExternalServer" /etc/apache2

并得到以下回复:

/etc/apache2/conf-available/php5-fpm.conf:FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization

这也是,当我尝试重新启动Apache时:

 * Restarting web server apache2                                                                                                        [fail] 
 * The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 4 of /etc/apache2/mods-enabled/fastcgi.conf:
FastCgiIpcDir /var/lib/apache2/fastcgi: access for server (uid 33, gid 33) failed: write not allowed
Action 'configtest' failed.
The Apache error log may have more information.

这是包含违规行的文件:

<IfModule mod_fastcgi.c>
  AddHandler fastcgi-script .fcgi
  #FastCgiWrapper /usr/lib/apache2/suexec
  FastCgiIpcDir /var/lib/apache2/fastcgi
</IfModule>

任何人都可以帮助我吗?

1 个答案:

答案 0 :(得分:7)

我有同样的错误。最初 / var / lib / apache2 / fastcgi 已归 www-data 所有。我不得不将/ var / lib / apache2 / fastcgi(所有文件/递归)的权限更改为 0777 。我尝试了0744和0755,但错误仍然存​​在于那些配置中。