2014年6月30日 星期一

APACHE 2.4 with PHP-FPM on Debian

Packages:

apache=2.4.9-2
apache-mpm-worker=2.4.9-2
libapache2-mod-fastcgi
php5=5.6.0
php5-cgi=5.6.0
php5-fpm=5.6.0


enable required modules

sudo a2enmod fastcgi alias actions


Start php5-fpm service

sudo service php5-fpm start

Config apache


Create the php-fpm configuration file.

Either:
1. put the snippet in conf-available/php-fpm.conf
    and use a2enconf php-fpm
or
2. put the snippet in conf.d/<your-file-name>
    and include it in your virtual host

Use phpinfo(); to Make sure apache is using PHP-FPM