Some experiments with Lighttpd/FastCGI
I setup Lighttpd 1.4.18 with FastCGI support for PHP on my development server last night just to see if it's gotten any better since I last tried it. So far so good, at least setup and install went much better this time. Ubuntu has had Lighttpd in the repos since Dapper (although only Gutsy and Hardy are up to date.) Setting up FastCGI was easy this time around, I didn't get any server errors at all, although it's possible I only owe this to better understanding of the documentation. Just for kicks, I also installed eAccelerator, which is a PHP op-code cache that I've been using on my primary server for a few months along with some other performance tweaks (mostly various types of caching.)
I also experimented with Apache's mod_proxy to forward requests to dev.w1ldt4ng3nt.net to my development server. You'll notice that that URL points to the same address as all my other ones and uses port 80, but the content is on two different servers on my network. This is done with a simple rewrite rule you can put in your virtual hosts config file or an .htaccess file (this site was a big help):
RewriteEngine on
RewriteCond %{HTTP_HOST} ^dev\.
RewriteRule (.*) http://192.168.1.119/$1 [P] I'm considering using a proxy setup to have all static content (such as images) on my site served from a Lighttpd server.
Overall, I really do like Lighttpd for it's speed and low resource footprint but I can't help feeling that the development team is really holding themselves back by not creating a module to handle Apache's .htaccess files that many web-apps these days rely on for things like rewriting ugly URLs into clean ones (such on this site itself). For now, Lighttpd will only be an experiment for me, I can't switch completely until I have a way to use .htaccess.
Comments
Post new comment