FCGIWrapper Vs Action方式
AddHandler fcgid-script .php
<Directory /var/www/>
FCGIWrapper /usr/local/bin/php-cgi .php
Options +ExecCGI
</Directory>
AddHandler php-fcgi .php
Action php-fcgi /fcgi-bin/php5-cgi
AddType application/x-httpd-php .php
Alias /fcgi-bin/ /usr/bin/
<Location /fcgi-bin/>
SetHandler fcgid-script
Options +ExecCGI
</Location>
from my experience, both setups offer the same functionality in the
end. I prefer using handlers to FCGIWrapper too, as it's much more
flexible (as you noticed), you can have PHP4 and PHP5 compiled with
FastCGI and switch on a per-directory context using AddHandler
in .htaccess, rather then fiddling with Apache directives on
httpd.conf level config (if .htaccess control is what you need/want).
Furthermore your Apache config doesn't break if the PHP executable
goes missing (unlike FCGIWrapper), which is important if you use
wrapper scripts and suexec instead of calling the binary directly
(e.g. for virtual hosting environment), and risk users getting rid of
the wrapper scripts by accident.
-- Main.Laruence - 2009-07-10
Topic revision: r1 - 2009-07-10 - 08:10:02 - Main.Laruence