Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 55180 invoked from network); 9 Apr 2011 23:03:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Apr 2011 23:03:26 -0000 Received: (qmail 76669 invoked by uid 500); 9 Apr 2011 23:03:24 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 76634 invoked by uid 500); 9 Apr 2011 23:03:24 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 76626 invoked by uid 99); 9 Apr 2011 23:03:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Apr 2011 23:03:24 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sean.copenhaver@gmail.com designates 209.85.213.52 as permitted sender) Received: from [209.85.213.52] (HELO mail-yw0-f52.google.com) (209.85.213.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Apr 2011 23:03:19 +0000 Received: by ywa1 with SMTP id 1so3464151ywa.11 for ; Sat, 09 Apr 2011 16:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:message-id:in-reply-to:references :subject:x-mailer:mime-version:content-type :content-transfer-encoding; bh=kQ+eZrAR4fZcSMyszt5a1rj/FyCddANn08gkDgZXXGU=; b=KxaV1YQ6uVHvOPnCtUKTHVnz91IngLmYL8gmQB5lPq/Sbaxd3fxH9tkU8MmbVSCVzi onE6JxNxYaQB5Q/uCkI8Hzshw7HyRPn5sZnKmz02k28HNURXsYjTbLJkdJblqjizKybH l6RzECp69JsJVw088ViQVDISpp7MWbRZx6aB0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:message-id:in-reply-to:references:subject:x-mailer :mime-version:content-type:content-transfer-encoding; b=VHz1X3tfxjamHmGdh6xOX/GrU10BktM2bSDBagvF19+BuhjrEiULRPPL2DlSj8gAS8 OkONPPyP/ydJ5aVqbEJ558Zsm9uhp23e54HV9bh8HaArrLNfiKSkrw0mLp9H0lTDYqhX 0BDDcdfj/suqZT+YcuahikSrCOuCp48YEw2gI= Received: by 10.236.31.230 with SMTP id m66mr5079248yha.60.1302390178466; Sat, 09 Apr 2011 16:02:58 -0700 (PDT) Received: from copenhas-mbp.local (99-98-235-230.lightspeed.clmasc.sbcglobal.net [99.98.235.230]) by mx.google.com with ESMTPS id g69sm1879801yhc.88.2011.04.09.16.02.57 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 09 Apr 2011 16:02:57 -0700 (PDT) Date: Sat, 9 Apr 2011 19:02:56 -0400 From: Sean Copenhaver To: user@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: Re: Redirect the welcome page without breaking Futon? X-Mailer: sparrow 1.0.1 (build 589.16) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="4da0e5a0_4d08a9e4_bc2" Content-Transfer-Encoding: 8bit --4da0e5a0_4d08a9e4_bc2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Disposition: inline You can actually setup virtual hosts and url rewrites inside CouchDB to allow you to pretty much map any URL to a doc or function that you want. It may allow you to go without nginx or with little relying on it: http://blog.couchbase.com/whats-new-in-apache-couchdb-0-11-part-one-nice-urls -- Sean Copenhaver On Saturday, April 9, 2011 at 6:04 PM, Hendrik Jan van Meerveld wrote: Hi Couch users, > > For my new Couchdb website I am looking to a way to achieve the following. > I would like my visitors to just type "http://www.mysite.com/" and be > redirected to another page. > > Using Nginx as a reverse proxy works if I use the following rewrite: > > location / { > rewrite ^ /mydatabase/_design/main/_show/blah/home permanent; > proxy_pass http://localhost:5984; > proxy_redirect off; > proxy_set_header Host $host; > proxy_set_header X-Real-IP $remote_addr; > proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; > } > > The problem with this approach is that Futon starts complaining because the > welcome page is no valid JSON anymore. > > > Is there a way to redirect "http://www.mysite.com" and still keep Futon > working. > > > Thanks for any help. > Kind regards, > Hendrik Jan > --4da0e5a0_4d08a9e4_bc2--