Here I described how to install lighttpd with fastcgi. Because that uses too much RAM for my 128MB box I was told to use php5-fpm instead.
After a while of research I found out that php5-fpm does not even exist for Debian 6. Great.
But it does, in the dotdeb package!
Make sure you have installed lighttpd and fastcgi like described here, then continue with the following:
nano /etc/apt/sources.list
Uncomment everything with # and add:
deb http://packages.dotdeb.org squeeze all deb-src http://packages.dotdeb.org squeeze all
save with ctrl+x and confirm with y.
Then get the GnuPG key or it won’t work:
wget http://www.dotdeb.org/dotdeb.gpg cat dotdeb.gpg | apt-key add -
Install php5-fpm, first update or it won’t work:
apt-get update apt-get install php5-fpm php5
Replace the config:
nano /etc/lighttpd/conf-available/15-fastcgi-php.conf
Insert:
# /usr/share/doc/lighttpd-doc/fastcgi.txt.gz # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi ## Start an FastCGI server for php (needs the php5-cgi package) fastcgi.server += ( ".php" => (( "host" => "127.0.0.1", "port" => "9000", "broken-scriptfilename" => "enable" )) )
Restart the server:
/etc/init.d/lighttpd restart
Done.