无与伦比

Install Mod-FastCGI and PHP5-FPM on Ubuntu

Installation

$ sudo apt-get install apache2-mpm-worker libapache2-mod-fastcgi php5-fpm
$ sudo a2enmod actions alias fastcgi

Configuration

edit /etc/apache2/mods-enabled/fastcgi.conf:

AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
Restart Apache2 and PHP5-FPM

$ sudo service apache2 restart && sudo service php5-fpm restart

退出移动版