我正在尝试用apache,fastcgi和fpm建立一个debian web服务器,但我很恼火.
一旦我停用mod_php,我就会收到以下错误:
[2014年5月22日12:16:10] [错误] [客户端xxx.xxx.xxx.xxx](13)权限被拒绝:FastCGI:无法连接到服务器"/ usr/lib/cgi-bin/php5-fcgi ":connect()失败,referer:http:// ...
[2014年5月22日12:16:10] [错误] [client xxx.xxx.xxx.xxx] FastCGI:从服务器"/ usr/lib/cgi-bin/php5-fcgi"收到的不完整标题(0字节), referer:http:// ...
文件/etc/apache2/conf.d/fastcgi:
<IfModule mod_fastcgi.c>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -idle-timeout 300 -pass-header Authorization
</IfModule>
Run Code Online (Sandbox Code Playgroud)
文件/etc/php5/fpm/pool.d/www.conf:
; Start a new pool named 'www'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('www' here)
[www]
; Per pool prefix
; It only applies on the following directives: …Run Code Online (Sandbox Code Playgroud)