From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.142.51.15 with SMTP id y15cs219431wfy; Fri, 25 Feb 2011 14:19:56 -0800 (PST) Return-Path: Received-SPF: pass (google.com: domain of rack-devel+bncCLSt1PGUFxCJ1qDrBBoEHpha4g@googlegroups.com designates 10.91.102.8 as permitted sender) client-ip=10.91.102.8; Authentication-Results: mr.google.com; spf=pass (google.com: domain of rack-devel+bncCLSt1PGUFxCJ1qDrBBoEHpha4g@googlegroups.com designates 10.91.102.8 as permitted sender) smtp.mail=rack-devel+bncCLSt1PGUFxCJ1qDrBBoEHpha4g@googlegroups.com; dkim=pass header.i=rack-devel+bncCLSt1PGUFxCJ1qDrBBoEHpha4g@googlegroups.com Received: from mr.google.com ([10.91.102.8]) by 10.91.102.8 with SMTP id e8mr530589agm.5.1298672395714 (num_hops = 1); Fri, 25 Feb 2011 14:19:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:x-beenthere:mime-version:date:x-ip:user-agent :x-http-useragent:message-id:subject:from:to:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe:content-type; bh=jkvWbanrSC9KzPwQGULYOVUSVLXy+2mSMXh1aOeoO34=; b=xuojyIkW8+rIUChV1sVpaB/TdJrGSMNfuxHAIUNHeQhOGF4Kxs7fSVSN1yP6m0Zgwd W/x5C3SWmaYVll1O1/ubZjxLO9hXgvu904//atjpAD4G9PJfix/6ILwLrmkumCm8sb65 QFsJ6oYZcH+jTDkAx2/XXnPHTFcXmK7Qc3C60= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:mime-version:date:x-ip:user-agent:x-http-useragent :message-id:subject:from:to:x-original-sender:reply-to:precedence :mailing-list:list-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; b=M0UelSBKUZmDW8jzWau2R3XjiqeLWBtti307lOPTNNymL1HaAaUsz9HqMrL2bNnM+c 60Zjmn8WARluM6wSHKi9sE0IuRBC30uJbsbzaByGxmrIBGyyPLSSDtUQeHnjAQv03hZ4 SYiYmeBfOnuF4e2XM3NBgswmiBCKQ+VTUUl/w= Received: by 10.91.102.8 with SMTP id e8mr132055agm.5.1298672393871; Fri, 25 Feb 2011 14:19:53 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.150.48.35 with SMTP id v35ls1143214ybv.2.p; Fri, 25 Feb 2011 14:19:53 -0800 (PST) Received: by 10.151.43.1 with SMTP id v1mr1707143ybj.26.1298672393143; Fri, 25 Feb 2011 14:19:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.91.169.18 with SMTP id w18mr386252ago.21.1298667738300; Fri, 25 Feb 2011 13:02:18 -0800 (PST) Received: by y31g2000prd.googlegroups.com with HTTP; Fri, 25 Feb 2011 13:02:18 -0800 (PST) Date: Fri, 25 Feb 2011 13:02:18 -0800 (PST) X-IP: 74.138.128.122 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4,gzip(gfe) Message-ID: Subject: Question about using a host name with URLMap From: Hoofman To: Rack Development X-Original-Sender: jlwillis@gmail.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=ISO-8859-1 I am having difficulty following the documentation for Rack::URLMap to map a host name to a separate app. Please explain how to modify config.ru to accomplish this (rack 1.2.1). Requesting http://api.localhost.lan/ responds with "main site" instead of "api site". #config.ru map 'http://api.localhost.lan/' do run lambda { [200, { "Content-Type" => "text/plain" }, "api site"] } end map '/' do run lambda { [200, { "Content-Type" => "text/plain" }, "main site"] } end