Now install PHP5:
apt-get install php5-cli php5-common php5-suhosin
And also PHP5-FPM:
apt-get install php5-fpm
Edit the config file(s) of nginx to include this:
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
Install some extra modules for PHP:
apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
Remember to restart PHP5-FPM
after installing new modules. Also restart nginx
if you have changed the server’s config files:
service php5-fpm restart
service nginx restart
Use the following command to search for extra PHP5 modules:
apt-cache search php5