While we're about it we'll pick and choose whatever other PHP modules we want alongside.
Install PHP-FPM Repository
We have to download some dependency packages and the php5-fpm module repository:-
Paste this to install the FPM module along with PHP's dependent packages:-
Now edit this list to install non-essential PHP modules, although what's here is recommended for most purposes and can be changed later easily enough. One thing, php5-suhosin is an important security patch so, for most, don't omit that PHP module.
Find out what modules are available by typing “aptitude search php5”.
Kick it up:-
(As explained above, for Debian you'll have to reboot.)
Analysing PHP with Phpinfo
When you've added Nginx and set up a site you'll be able to peruse your php configuration, detailing all those PHP extensions we installed, by adding some-page.php and inserting within:-
.. before browsing to the new page in your browser to read the results.
For your security, when you're finished with that information, delete the phpinfo page or, at least, delete the command to show this information (which is a goldmine of info for hackers.)