httpd 2.4連接php-fpm
阿新 • • 發佈:2018-12-06
配置 rtu eth fpm www. pro doc dex match
第一種方法(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