lighttpdmongrel
Lighttpd + Mongrel
Fast HTTP library and server for Ruby that is intended for hosting Ruby web applications of any kind using plain HTTP rather than FastCGI or SCGI. It is framework agnostic and already supports Ruby On Rails, Og+Nitro, and Camping frameworks.
Original: http://mongrel.rubyforge.org/docs/lighttpd.html (have also very good caching hin – mod_cml and lua)# lighttpd.conf server.modules = ( "mod_rewrite", "mod_redirect", "mod_access", "mod_accesslog", "mod_compress", "mod_proxy") proxy.balance = "fair" proxy.server = ( "/" => ( ( "host" => "127.0.0.1", "port" => 8001 ), ( "host" => "127.0.0.1", "port" => 8002 ), ( "host" => "127.0.0.1", "port" => 8003 ) ) ) $ mongrel_rails start -d -p 8001 \ -e production -P log/mongrel-1.pid $ mongrel_rails start -d -p 8002 \ -e production -P log/mongrel-2.pid $ mongrel_rails start -d -p 8003 \ -e production -P log/mongrel-3.pidPut mongrel under runit control
# in ~/Sites/{appname} create 'run' file:
#!/bin/sh -e
exec 2>&1 \
/usr/bin/mongrel_rails start -e production -p 8000
# and cd ~/runit; ln -s ~/Sites/{appname}