ApplicationsUsingLighttpd » History » Revision 5
Revision 4 (jan, 2005-07-11 16:14) → Revision 5/34 (jan, 2005-07-11 16:15)
= Applications Using lighttpd = Lighttpd works nicely with most web-projects. To get them setup easily some are providing special lighttpd setups. * [http://www.rubyonrails.org/ RubyOnRails] * [http://drupal.org/node/20766 Drupal] * [http://hieraki.simplicio.com/read/book/1 Lighttpd: The painless way] * [http://wordpress.org/support/topic/27541 Wordpress] * [http://trac.lighttpd.net/trac/wiki/TracInstall Trac] * [http://article.gmane.org/gmane.comp.web.lighttpd/1752 Mailman] == Using a Perl dispatcher instead of mod_perl == I just received a mail from Alex Shah <ashah@teamsoa.com>: {{{ I thought you might like to include this in the distribution: #!/usr/bin/perl use strict; use CGI::Fast; use Embed::Persistent; { my $p = Embed::Persistent->new(); while (new CGI::Fast) { my $filename = $ENV{SCRIPT_FILENAME}; my $package = $p->valid_package_name($filename); my $mtime; if ($p->cached($filename, $package, \$mtime)) { eval {$package->handler;}; } else { $p->eval_file($ENV{SCRIPT_FILENAME}); } } } Here's the lighttpd.conf: fastcgi.server = ( ".pl" => (( ( "localhost" => ( "socket" => "/tmp/application.fcgi.socket", "bin-path" => "/Users/ashah/docroot/dispatch.fcgi", ) )) ) ) }}} == multiple RubyOnRails on one server == http://wiki.rubyonrails.com/rails/show/HowtoDeployMoreThanOneRailsAppOnOneMachine [http://wiki.rubyonrails.com/rails/show/HowtoDeployMoreThanOneRailsAppOnOneMachine] describes this on Apache, here we do it on lighty: {{{ $HTTP["url"] =~ "^/appOne" { fastcgi.server = ( "dispatch.fcgi" => (( "bin-path" ... ))) server.error-handler-404 = "/appOne/dispatch.fcgi" } $HTTP["url"] =~ "^/appTwo" { fastcgi.server = ( "dispatch.fcgi" => (( "bin-path" ... ))) server.error-handler-404 = "/appTwo/dispatch.fcgi" } }}}