Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4400A674A for ; Fri, 27 May 2011 00:09:21 +0000 (UTC) Received: (qmail 75811 invoked by uid 500); 27 May 2011 00:09:19 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 75778 invoked by uid 500); 27 May 2011 00:09:19 -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 75770 invoked by uid 99); 27 May 2011 00:09:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 May 2011 00:09:19 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=NORMAL_HTTP_TO_IP,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [85.10.203.117] (HELO mx1.taywa.net) (85.10.203.117) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 May 2011 00:09:10 +0000 Received: from [192.168.1.186] (80-218-127-52.dclient.hispeed.ch [80.218.127.52]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.taywa.net (Postfix) with ESMTP id 636D5328001 for ; Fri, 27 May 2011 01:47:20 +0200 (CEST) From: Yves Serrano Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: vhost rewrite and httpd_global_handlers Date: Fri, 27 May 2011 02:08:45 +0200 Message-Id: <8294721F-1846-4DFC-8B5F-1424F490CCF2@yas.ch> To: user@couchdb.apache.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-taywa-MailScanner: Found to be clean X-taywa-MailScanner-SpamScore: ss X-taywa-MailScanner-From: y@yas.ch X-Virus-Checked: Checked by ClamAV on apache.org hi I'm new to couchdb and it makes fun to play with it :-). I using vhost and rewrites to get nice urls. I also have defined some = static html via ... [httpd_global_handlers] static =3D {couch_httpd_misc_handlers, handle_utils_dir_req, = "/path/to/static"} ... My problem is that I can't get access to http://127.0.0.1:5984/static = from my vhost http://couchdb.local/static.=20 I get into a 301 redirect loop, which stops after to much recursion.=20 I tried this rewrite rule: { "from": "/static/*", "to": "../../../static/*" }, // my vhost setup [vhosts] cochdb.local:5984 =3D /mydb/_design/mydb/_rewrite/ I needed to set secure_rewrites to false, otherwise I get the error: = "insecure_rewrite_rule". Is there a better way? I'm using couchdb 1.0.2. I want to archive this without any other http = server like apache to keep it simple. What I'm doing wrong? Is this possible with couchdb 1.0.2? If not, will = it be possible with couchdb 1.1.0?=20 regards yves