第一种方法(SetHandler)
追加到/etc/httpd/conf/httpd.conf最后
<FilesMatch .php$>setHandler "proxy:fcgi://127.0.0.1:9000"</FilesMatch>
第二种方法(ProxyPassMatch)
虚拟主机内配置
<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>
第三种方法(ProxyPass)
虚拟主机内配置
<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/
httpd 2.4连接php-fpm
原文地址:https://www.cnblogs.com/feng-land/p/10075971.html