->
In my attempts to performance tune the blog I’ve been looking at alternate web servers, primarily lighttpd. One of the initial issues that I had with an attempted migration was that of enabling php. With Apache php had been simple, but lighttpd needed a bit more.
To install a php fastcgi enabled web server using lighttpd you’ll need the following packages:
sudo aptitude install lighttpd php5-cgi
The trick after installing is to activate the fastcgi module included with lighttpd. This is done using:
sudo lighttpd-enable-mod fastcgi
sudo /etc/init.d/lighttpd reload
In order to test this you can create a file within your document root (likely /var/www/) called info.php, with the following contents (remove the excess spaces):
< ? php
phpinfo();
? >
Now you should be able to access your site, http://example.com/info.php. If you get a fancy list of php options you’re done!
If this site has been useful, please consider participating in the Fundraiser.