如何为php 5.6和apache 2.2configurationphp-fpm

我通过使用repo从我的centos 6.6安装了php 5.6,apache 2.2和php-fpm

https://webtatic.com/packages/php56/

我遵循这个指令abd尝试使php-fpm工作http://www.garron.me/en/linux/apache-mpm-worker-php-fpm-mysql-centos.html

但是这个教程有些不同之处:

  • fcgi模块的conf文件位置在/etc/httpd/conf.d/fcgid.conf中
  • 在这样的位置没有/ var / lib / cgi-bin / php5-fcgi
  • 在这个位置没有/var/run/php5-fpm.sock

fcgid.conf

# This is the Apache server configuration file for providing FastCGI support # through mod_fcgid # # Documentation is available at # http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html LoadModule fcgid_module modules/mod_fcgid.so # Use FastCGI to process .fcg .fcgi & .fpl scripts AddHandler fcgid-script fcg fcgi fpl # Sane place to put sockets and shared memory file FcgidIPCDir /var/run/mod_fcgid FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm 

UDPATE

 <IfModule mod_fastcgi.c> ScriptAlias /fcgi-bin/ /usr/bin/ AddType application/x-httpd-php .php AddHandler php-fastcgi .php Action php-fastcgi /fcgi-bin/php-cgi FastCgiExternalServer /usr/bin/php-cgi -host 127.0.0.1:9000 </IfModule> 

任何人都知道如何configuration? 在phpinfo中没有php-fpm信息显示,我使用echo php_sapi_name();它返回'cgi-fcgi'

我试图删除,有一个错误无效的命令'FastCgiExternalServer',也许拼错或定义

您正在使用fcgid模块,但不使用mod_fastcgi,没有FastCgiExternalServer指令。 但我不知道如何使fcgid和php-fpm在一起。

我终于用php-fpm使用nginx,而apache可以继续打开