Apache 使用fcgi 解析PHP

Apache  使用fcgi 解析PHP 

httpd.conf 文件

<VirtualHost *:80>
  #ServerAdmin webmaster@localhost
  ServerName www.afei.com
  DocumentRoot /data/www
  
  #主要是这2个配置
  ProxyRequests Off
  ProxyPassMatch ^/(.*.php(/.*)?)$ fcgi://127.0.0.1:9000/data/www/$1

  <Directory /data/www>
     Options FollowSymlinks
     DirectoryIndex index.php
     AllowOverride All
     Require all granted
  </Directory>
</VirtualHost>

conf/httpd.conf 中需要打开的扩展

#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
#LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule proxy_http_module modules/mod_proxy_http.so  

原文地址:https://www.cnblogs.com/dafei4/p/12939088.html