追加到/etc/httpd/conf/httpd.conf最后
<FilesMatch .php$>setHandler "proxy:fcgi://127.0.0.1:9000"</FilesMatch>
虚拟主机内配置
<VirtualHost *:80> ServerName www.a.com DocumentRoot /var/www/html/ ProxyRequests Off ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/var/www/html/$1</VirtualHost>
虚拟主机内配置
<VirtualHost *:80> ServerName www.a.com DocumentRoot /var/www/html/ <LocationMatch ^(.*.php)$> ProxyPass fcgi://127.0.0.1:9000/var/www/html/ ProxyErrorOverride on </LocationMatch></VirtualHost>
本文参考了:http://www.taoluyuan.com/index.php/archives/37/#http://www.taoluyuan.com/index.php/archives/37/