我想利用Rack、快车轮船和灯塔进行简单的应用,但我不能这样做。
我有以下错误:
/usr/lib/ruby/1.8/rack/handler/fastcgi.rb:23:in `initialize : Address already in use - bind(2) (Errno::EADDRINUSE)
from /usr/lib/ruby/1.8/rack/handler/fastcgi.rb:23:in `new
from /usr/lib/ruby/1.8/rack/handler/fastcgi.rb:23:in `run
from /www/test.rb:7
申请:
#!/usr/bin/ruby
app = Proc.new do |env|
[200, { Content-Type => text/plain }, "Hello World!"]
end
require rack
Rack::Handler::FastCGI.run app, :Port => 4000
页: 1 会议:
server.modules += ( "mod_access", "mod_accesslog", "mod_fastcgi" )
server.port = 80
server.document-root = "/www"
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png"
)
index-file.names = ( "test.rb" )
fastcgi.debug = 1
fastcgi.server = ( ".rb" =>
((
"host" => "127.0.0.1",
"port" => 4000,
"bin-path" => "/www/test.rb",
"check-local" => "disable",
"max-procs" => 1
))
)
谁能帮助我? 我做了什么错误?