Lighttpd 1.5 SVN FastCGi

A few weeks back I moved from lighttpd 1.4 to the SVN version so I could blog from flickr. From what I have seen lighttpd 1.5 is looks quite nice.

I did have one problem though. I couldn’t seem to work out why fastcgi wasn’t compiling. Turns out that fastcgi has been completely removed from lighttpd and being replaced with mod_proxy_core.

Once I found this out, setting up fastcgi to work with lighttpd was a breeze. I installed spawn-fcgi on gentoo, and configured respectively. I then added a few lines into my config that looked something like this. It may vary depending on your fastcgi spawner config.

  $PHYSICAL["existing-path"] =~ ".php$" {
      proxy-core.balancer = "round-robin"
      proxy-core.protocol = "fastcgi"
      proxy-core.allow-x-sendfile = "enable"
      proxy-core.backends = ( "127.0.0.1:1026" )
      proxy-core.max-pool-size = 16
      proxy-core.rewrite-request = (
        "_pathinfo" => ( ".php(/.*)" => "$1" )
            )
     }

Rebooted lighttpd and everything was working wonderful.
A few sites that helped me out.
http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModProxyCore
http://www.cyberciti.biz/tips/freebsd-linux-lighttpd-1-5-fastcgi-configuration.html

Comments are closed.