Multiple Apps running under Lighttpd with scgi on a Windows

I’ve run into a problem on one of my development machines. I’m trying to
run multiple rails apps on one dev machine that runs Windows. Problem is
that is seems that I can only run one scgi_service at a time, meaning
that only one of my apps will function at a time. Anyone know how I can
get around this, other than getting a *nix box (which I should have
soon, hopefully) ?

Lighttpd.conf (part of it):

var.test= “C:/Rails/Test”

$HTTP[“host”] == “test” {
server.document-root = var.test+ “/public”
server.errorlog = var.test+ “/log/lighttpd-errors.log”
accesslog.filename = var.test+ “/log/lighttpd-access.log”
static-file.exclude-extensions = ( “.php”, “.pl”, “.fcgi”, “.scgi” )
server.error-handler-404 = “/dispatch.scgi”
scgi.server = ( “dispatch.scgi” => ((
“host” => “127.0.0.1”,
“port” => 1001,
“check-local” => “disable”
)) )
}

var.test2= “C:/Rails/Test2”

$HTTP[“host”] == “test2” {
server.document-root = var.test2+ “/public”
server.errorlog = var.test2+ “/log/lighttpd-errors.log”
accesslog.filename = var.test2+ “/log/lighttpd-access.log”
static-file.exclude-extensions = ( “.php”, “.pl”, “.fcgi”, “.scgi” )
server.error-handler-404 = “/dispatch.scgi”
scgi.server = ( “dispatch.scgi” => ((
“host” => “127.0.0.1”,
“port” => 1000,
“check-local” => “disable”
)) )
}

Scgi.yaml #1

:host: 127.0.0.1
:password: **********
:port: 1001
:logfile: log/scgi.log
:config: config/scgi.yaml
:control_url: druby://127.0.0.1:8999
:disable_signals: true
:env: production

Scgi.yaml #2

:host: 127.0.0.1
:password: **********
:port: 1000
:logfile: log/scgi.log
:config: config/scgi.yaml
:control_url: druby://127.0.0.1:8999
:disable_signals: true
:env: production

Heres the error I get:

c:/ruby/lib/ruby/1.8/drb/drb.rb:853:in initialize': Only one usage of each sock et address (protocol/network address/port) is normally permitted. - bind(2) (Err no::EADDRINUSE) from c:/ruby/lib/ruby/1.8/drb/drb.rb:853:in open’
from c:/ruby/lib/ruby/1.8/drb/drb.rb:853:in open_server' from c:/ruby/lib/ruby/1.8/drb/drb.rb:747:in open_server’
from c:/ruby/lib/ruby/1.8/drb/drb.rb:745:in each' from c:/ruby/lib/ruby/1.8/drb/drb.rb:745:in open_server’
from c:/ruby/lib/ruby/1.8/drb/drb.rb:1286:in initialize' from c:/ruby/lib/ruby/1.8/drb/drb.rb:1549:in new’
from c:/ruby/lib/ruby/1.8/drb/drb.rb:1549:in start_service' from c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:402:in run’
from
c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:61

    from c:/ruby/bin/scgi_service:18:in `load'
    from c:/ruby/bin/scgi_service:18

Thanks.

Eric


Eric G.
http://www.ericgoodwin.com

where can I find a tutorial running scgi with lighty on my local
windows machine?

Hi Eric,

I’m still running the 0.3 version of SCGI on our boxes but I think the
problem may well be that you have the same port configured for
admistration for both apps (:control_url). Try changing the port
number (8999) and see if that helps.

Paul.

Onur T. wrote:

where can I find a tutorial running scgi with lighty on my local
windows machine?

http://wiki.rubyonrails.org/rails/pages/HowToDeployWithLighttpdOnWindows

Created by Chris H. I think.
You can track lighttpd stuff at
http://forum.lighttpd.net/forum/1
if you are inclined.

Thanks, Shashy

Hi,
Thanks for the help Paul. Worked like a charm. I should have tried a
couple more things before posting.
Cheers,
Eric

Paul W. wrote:

)) )
scgi.server = ( "dispatch.scgi" => ((

:port: 1001
:port: 1000
each sock
from c:/ruby/lib/ruby/1.8/drb/drb.rb:1549:in `start_service’


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Eric G.
http://www.ericgoodwin.com

http://wiki.rubyonrails.org/rails/pages/HowToDeployWithLighttpdOnWindows
http://www.kevinworthington.com:8181/?p=104

– Tom.

On 1/27/06, Onur T. [email protected] wrote:

scgi.server = ( "dispatch.scgi" => ((
server.errorlog = var.test2+ "/log/lighttpd-errors.log"

Scgi.yaml #1
Scgi.yaml #2

    from c:/ruby/lib/ruby/1.8/drb/drb.rb:745:in `each'
    from c:/ruby/bin/scgi_service:18:in `load'

Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


“Nothing will ever be attempted, if all
possible objections must first be
overcome.” - Samuel Johnson

“Luck is what happens when
preparation meets opportunity.” - Seneca