Here is a quick howto for setting up nginx and php-fpm on a Debian 6 VPS. We will be using the dotdeb repository for this so a big thanks goes to the dotdeb guys for building such reliable Debian packages.
This has been tested on a Debian 6 OpenVZ minimal template:
First add the dotdeb repo to your sources.list file:
Code:
nano /etc/apt/sources.list
add this to the bottom of the file:
Code:
deb http://packages.dotdeb.org stable all
Next, add the GnuPG key to your distribution:
Code:
wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg | sudo apt-key add -
rm dotdeb.gpg
Update APT:
Install php and php-fpm plus some common addons:
Code:
apt-get install php5 php5-fpm php-pear php5-common php5-mcrypt php5-mysql php5-cli php5-gd
Install nginx:
Code:
apt-get install nginx
Tweak the php-fpm configuration:
...