goku2 asked:

How to setup multiple apps on Nitro and Lighttpd?

Does anyone has a recipe to setup multiple nitro apps in one lighttpd server under the same domain? For example, to access app1: http://mydomain.com/app1

And app2: http://mydomain.com/app2

Thanks!!

(2 attempts)

japacheze answered:

In addition to the other portions of the configuration file, use a conditional like the following. I think this will work. YMMV

$HTTP["host"] =~ "mydomain\.com\/app1" {
server.document-root = "/home/*username*/_path-to-public-directory_of_app1_/" 

fastcgi.server= (".rb" =>
   ("localhost" =>
      (
         "socket" => "/home/*username*/var/lighttpd-fcgi.socket",
         "bin-path" => "/home/*username*/_path-to-public-directory_of_app1_/fcgi.rb",
         "bin-environment" => ("NITRO_ENV" => "development" ),         
         "min-procs" => 1,
         "max-procs" => 5, 
         )
   )
 )
}

$HTTP["host"] =~ "mydomain\.com\/app2" {
server.document-root = "/home/*username*/_path-to-public-directory_of_app2_/" 

fastcgi.server= (".rb" =>
   ("localhost" =>
      (
         "socket" => "/home/*username*/var/lighttpd-fcgi.socket",
         "bin-path" => "/home/*username*/_path-to-public-directory_of_app2_/fcgi.rb",
         "bin-environment" => ("NITRO_ENV" => "development" ),         
         "min-procs" => 1,
         "max-procs" => 5, 
         )
   )
 )
}

Rating: 4

Fabian answered:

There's an interesting Article of ZimbaTM with running Camping + Nitro on Mongrel. You could maybe run multiple Nitro apps in a similar way via lighttpd. Dunno whether this'll find it's way to standard Nitro though:

Nitro, Camping and Mongrel all together

Rating: 4