大飞_dafei

导航

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  

 

 

posted on 2018-12-26 18:57  大飞_dafei  阅读(268)  评论(0编辑  收藏  举报