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 4F4A71016B for ; Tue, 12 Nov 2013 11:34:15 +0000 (UTC) Received: (qmail 42311 invoked by uid 500); 12 Nov 2013 11:33:22 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 42262 invoked by uid 500); 12 Nov 2013 11:33:18 -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 42211 invoked by uid 99); 12 Nov 2013 11:33:08 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Nov 2013 11:33:08 +0000 Received: from localhost (HELO mail-la0-f49.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Nov 2013 11:33:07 +0000 Received: by mail-la0-f49.google.com with SMTP id er20so1765956lab.8 for ; Tue, 12 Nov 2013 03:33:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=cwO2Gogpm3KBTYGsv+hPr6UMHPjUExxoi2BOkVQGGhg=; b=Z7tUUU4muxcbVXTFE9b+9sUKp2CKB1dRaqHrbIKcmo79M8CnqQnchQTbrnSGMeBWcU DuaEqzB4566QKnvh1v6Q1O95MtPeXwx7VapW30iVpNF4OBZ14/bQckjd//JWk+Rb9IpU 7JRFlDdlLN0tomERFBmFV5K+uGP/ss3L5dp5ZEfuij1KIrYMT6jGNC9oUOoVaDyBnq+X sTai8jCf3aNzWPIvOvQCIupRfV/x+ifcf/ZB/OUcf0ocv0CswxLGWJBJbAt4nG1Sd/cI cDqIvCIln76Adp7E23mBb4Rc1O5fcEt2gSkhMWgBWAPOXYxI6c2MbdmN1aoC6P4rmoOK nDBg== MIME-Version: 1.0 X-Received: by 10.152.170.199 with SMTP id ao7mr1025468lac.40.1384255985742; Tue, 12 Nov 2013 03:33:05 -0800 (PST) Received: by 10.112.67.12 with HTTP; Tue, 12 Nov 2013 03:33:05 -0800 (PST) In-Reply-To: References: <87D24098-8BC5-4A4D-84D1-597F5B7919FC@sri.com> Date: Tue, 12 Nov 2013 11:33:05 +0000 Message-ID: Subject: Re: rewrites not working From: Robert Newson To: "user@couchdb.apache.org" Content-Type: text/plain; charset=ISO-8859-1 typically, only root can bind to ports under 1024 and couchdb runs, and should run, as not-root. B. On 12 November 2013 10:27, Alexander Gabriel wrote: > Hi Jim > > I had some trouble configuring my local.ini file. > > Setting > > [httpd] > port = 80 > > doesn't work because I get a "Connection refused" answer when connecting > with curl. > > The only way I got it working was: > > [httpd] > port = 5984 > bind_address = 0.0.0.0 > > then redirecting form 5984 to 80: "iptables -t nat -A PREROUTING -p tcp > --dport 80 -j REDIRECT --to-ports 5984" > > Is this the reason form my trouble with rewrites? > > The vhost I set was: arteigenschaften.ch:5984 = > /artendb/_design/artendb/_rewrite > > Alex > > > 2013/11/11 Jim Klo > >> Couple of issues I see, answered inline below. >> >> Jim Klo >> Senior Software Engineer >> SRI International >> t: @nsomnac >> >> On Nov 10, 2013, at 8:38 PM, "Alexander Gabriel" > alex@barbalex.ch>> wrote: >> >> I call: >> "http://arteigenschaften.ch/artendb/_design/artendb/index.html" because >> that is where the web-app appears. And I would want it to show as " >> http://arteigenschaften.ch/index.html< >> http://arteigenschaften.ch/artendb/_design/artendb/index.html> >> >> Is your VHOST mapping right? >> >> I saw you had: >> arteigenschaften.ch:5984=/db >> name/_design/docname/_rewrite >> >> If you want it to answer on port 80, I think you either need to omit the >> port or specify 80 >> >> arteigenschaften.ch=/db >> name/_design/docname/_rewrite >> >> You should be able to test your rewrites by just going to: >> http://localhost:5984/artendb/_design/artendb/_rewrite >> >> It that works, then your problem is with your VHOST config (or reverse >> proxy depending upon how things are configured in your environment). If >> you're doing this remotely and can't access couch directly, I recommend >> doing a ssh port forward so you can test the redirect without VHOST mucking >> things up. >> >> - JK >> >>