るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.009秒)
トップページ > クエリ:port[x] > ライブラリ:webrick/httpserver[x]

別のキーワード

  1. uri default_port
  2. socket iff_team_port
  3. generic default_port
  4. socket iff_bridge_port
  5. socket iff_macvlan_port

クラス

キーワード

検索結果

WEBrick::HTTPServer#virtual_host(server) -> () (20.0)

サーバの保持しているバーチャルホストのリストに HTTP サーバ server を加えます。 クライアントからのリクエストのうち server へのものは server に委譲されるようになります。

...require 'webrick'
include WEBrick
srv1 = HTTPServer.new( { :Port => 1080, :ServerName => 'hoge.example.com' } )
srv2 = HTTPServer.new( { :Port => 1080, :ServerName => 'foo.example.com' } )

srv = HTTPServer.new( { :Port => 1080 } )
srv.virtual_host(srv1)
srv.virtual_host(srv2)
sr...

WEBrick::HTTPServer (8.0)

HTTP サーバの機能を提供するクラスです。

...rver.new({:DocumentRoot => '/home/username/public_html/',
:BindAddress => '127.0.0.1',
:Port => 10080})
srv.mount('/hoge.pl', WEBrick::HTTPServlet::CGIHandler, 'really_executed_script.rb')
Signal.trap(:INT){ srv.shutdown }
srv.start...

WEBrick::HTTPServer#mount(dir, servlet, *options) -> () (8.0)

サーバ上のディレクトリ dir にサーブレット servlet を対応させます。

...定します。

@param options サーブレットのコンストラクタの引数を指定します。

require 'webrick'
include WEBrick
srv = HTTPServer.new( { :BindAddress => '127.0.0.1', :Port => 10080 } )
srv.mount('/img', WEBrick::HTTPServlet::FileHandler, '/home/username/images')...