Latest News >> 2008-09-29

I read Obie’s most recent post about his intense passion for Loverboy’s quintessential anthem, “Lovin’ Every Minute Of It”. I find the early 1980’s music is inspiring and uplifting and definitely suited to such important things as corporate culture, recruiting, and motivating the troops to do better. Yes, nothing gets a worker working better than a little Loverboy right in their ear.

2008-09-25

Don’t forget folks, the FU NYC show will be in a few hours (7pm-9pm). I’ll be icecasting this one at http://zedshaw.com:8000/fu_nyc and as usual you can use VLC, mplayer or many other players to play the stream.

2008-09-17

I got into music school last week and I’m going to study guitar exclusively for the next year. This is something I’ve always wanted to do, but just never had the chance. Either I wasn’t good enough (being self-taught for so many years) or I just didn’t have the money. After being laid off and getting a small package I decided to practice my ass off on the guitar, do a few live shows to get ready, and then audition for a school in the city.

2008-09-04

The Freehackers Union NYC show went insanely well. I managed to pull off a full live internet feed of the audio to people in FU and the show at the same time. We had about 10 newbies show up to give their first five minutes and 11 listeners on IRC/icecast. Some people showed up just to hang out, so we relaxed the rules and let them stay to build an audience. Overall, there were some cool projects presented and everyone had a good time.

Lighttpd Configuration

You’ll need to tell lighttpd how to connect to your SCGI server. The nice thing is that the scgi_rails script knows how to fork itself to create a cluster for you, so all you need to do is point lighttpd at one port. Here’s the important parts of my configuration:

Make sure you have mod_scgi mentioned in the modules:

server.modules = ( "mod_rewrite", "mod_redirect", "mod_access", "mod_accesslog", "mod_compress", "mod_scgi" )

Tell lighttpd to route 404 errors to your SCGI server with this stupidity:

server.error-handler-404 = "/dispatch.scgi"

Next you have to tell lighttpd to route all requests for dispatch.scgi to SCGI and not to check for local.

scgi.server = ( "dispatch.scgi" => (( 
  "host" => "127.0.0.1",
  "port" => 9999,
  "check-local" => "disable" 
 )) )

What happens is lighttpd will check for a request in /public as a file, it doesn’t find a file so it runs the 404 handler. You’ve got /dispatch.scgi as the 404 handler, which is configured to then run 127.0.0.1:9999 SCGI server, which has check-local disabled. Then the bump on the frog on the log at the bottom of the ocean by the beach with the man with the tan will begin to work. Oh well, it’s much better than Apache’s configuration at least.

Then I turn on super debugging for fun:

scgi.debug=3

But make sure you turn this off in production. A common complaint people have is that lighttpd spams the lighttpd_error.log file with tons of connection messages and other stuff if debug=3. Set it to scgi.debug=0 for better messages in production.

NOTE: You do not need to create a public/dispatch.scgi file. This "file" is purely virtual in this configuration.

Cluster Configuration

Configuring a cluster under lighttpd is pretty easy. Here’s what I do:

scgi.server = ( "dispatch.scgi" => 
        ( 
        "server1" => 
                ( "host" => "127.0.0.1",
                "port" => 9999,
                "check-local" => "disable"),

        "server2" =>
                ( "host" => "127.0.0.1",
                "port" => 10000,
               "check-local" => "disable"),

        "server3" =>
                ( "host" => "127.0.0.1",
                "port" => 10001,
               "check-local" => "disable")
        )
)

This sets up three backends to handle the requests, with the first one getting the majority of the requests. You can even put these on different machines and set them up however you like.