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 848C1D27D for ; Fri, 21 Sep 2012 15:10:24 +0000 (UTC) Received: (qmail 49472 invoked by uid 500); 21 Sep 2012 15:10:23 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 49436 invoked by uid 500); 21 Sep 2012 15:10:23 -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 49424 invoked by uid 99); 21 Sep 2012 15:10:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2012 15:10:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of simon@cloudant.com designates 209.85.212.176 as permitted sender) Received: from [209.85.212.176] (HELO mail-wi0-f176.google.com) (209.85.212.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2012 15:10:14 +0000 Received: by wibhn17 with SMTP id hn17so1652190wib.5 for ; Fri, 21 Sep 2012 08:09:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:x-mailer :mime-version:content-type:x-gm-message-state; bh=mX6sKd+kp3XrTjqiv3XAt6B02DLCCPL1ZeYPONAhhlc=; b=NH7heQ7mLKOPEeVtV7NdaFZ3swF2vejus2ibv+Bhv/Dbb1LZy/6x0hc7i47hcgf0mR YE9ynmhgiFi2u/KY0qZ81QiWsP+V25c51S6PLDiuroN4HcFk05AlS/ouuYnIoEeDmskz BxPh0YsekZdrfBHLAnnY23mdZpA1sMok7rokBe8U3/EsBotMw++Z/cWwzrWk58pjziVf 3by9WPeh3umAPwESATy0uaLYBncp/YIGApO/MaryLyg4CK4RjS4c7yDgJ4MAVJWuwCE9 9IWTfyp++hBj9GgjS2KE35Q7nJ55QpDvADIW3HxbCD/k86bmvop2glJPq9oEFFiYIz51 IHDQ== Received: by 10.180.104.197 with SMTP id gg5mr5110329wib.9.1348240194276; Fri, 21 Sep 2012 08:09:54 -0700 (PDT) Received: from [192.168.1.73] (host86-146-2-132.range86-146.btcentralplus.com. [86.146.2.132]) by mx.google.com with ESMTPS id eu4sm38262878wib.2.2012.09.21.08.09.53 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 21 Sep 2012 08:09:53 -0700 (PDT) Date: Fri, 21 Sep 2012 16:09:51 +0100 From: Simon Metson To: user@couchdb.apache.org Message-ID: <744B7F29C80E4A32AE4A6D3DEA8DC246@cloudant.com> In-Reply-To: <505C829D.7010307@gmail.com> References: <50588AA2.5020602@gmail.com> <505897E9.3070007@gmail.com> <5058C9FB.1040003@gmail.com> <50591BF8.60505@gmail.com> <4CB5DEE630B54952AD6CFB8402C61969@cloudant.com> <505B84D7.2070703@gmail.com> <3F073B39189E45E9BEAF7CDD8BD0F0E1@cloudant.com> <505C829D.7010307@gmail.com> Subject: Re: does jquery.couch actually work ? X-Mailer: sparrow 1.6.3 (build 1172) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="505c833f_2708c9af_181cc" X-Gm-Message-State: ALoCoQl4+YGKCig4+Kw2DnCSjI+Kd0Rjw8FHHUjBrPWnAlo+DCCwA25yhxRkQksdM33MQUACq6Qx --505c833f_2708c9af_181cc Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Do you get anything in either CouchDB or nginx logs? On Friday, 21 September 2012 at 16:07, john.tiger wrote: > On 09/21/2012 06:00 AM, Simon Metson wrote: > > Yup, you'll need to proxy CouchDB so that everything appears to come from the same server. http://wiki.apache.org/couchdb/Nginx_As_a_Reverse_Proxy might be a decent place to start. > > > thks for this reference - still cannot get it to work - here is the file > (in sites-available symlinked to sites-enabled (nginx.conf is still the > default except with user added to top) > > any help appreciated > > server { > #listen 80; ## listen for ipv4; this line is default and implied > #listen [::]:80 default_server ipv6only=on; ## listen for ipv6 > > root /home/work/couchdb/testdb; > index index.html index.htm; > > # Make site accessible from http://localhost/ > server_name localhost; > > location ^/(.*)/_changes { > proxy_pass http://127.0.0.1:5984/; > proxy_redirect off; > proxy_buffering off; > proxy_set_header Host $host; > proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; > } > > location /testdb { > rewrite /testdb/(.*) /$1 break; > proxy_pass http://127.0.0.1:5984/; > proxy_redirect off; > proxy_set_header Host $host; > proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; > } > } > > > > > > > > On Thursday, 20 September 2012 at 22:04, john.tiger wrote: > > > > > On 09/20/2012 01:26 PM, Simon Metson wrote: > > > > Hey John, > > > > http://bradley-holt.com/2011/07/couchdb-jquery-plugin-reference/ might be a useful reference for you. > > > > > > > > I've got a working example that I'll put online tomorrow. It uses backbone Events to communicate when someone logs in/out, but if you don't need/want that removing it should be easy enough. > > > > Cheers > > > > Simon > > > > > > > > > > > > > hmm, I'm suspecting our stuff was "silently" failing - using straight > > > $.getjson call now shows: > > > > > > Origin http://127.0.0.1 is not allowed by Access-Control-Allow-Origin. > > > > > > the nginx conf is set up to render html pages at http://127.0.0.1 > > > > > > wondering if the nginx conf needs a line: > > > location // {proxy_pass http://127.0.0.1:5984;} > > > > > > > > > > > > > > > > > > > > > > > On Wednesday, 19 September 2012 at 02:12, john.tiger wrote: > > > > > > > > > On 09/18/2012 04:32 PM, Simon Metson wrote: > > > > > > You're trying to do login/session/logout in Backbone? Give me a few days > > > > > > and I can write up an example app. > > > > > > > > > > > > > > > > no not in Backbone, just in our own html5 and jquery code. Going thru > > > > > the jquery.couch lib and futon lib, I started to document the needed > > > > > calls - still not quite there - for example, to create a user (reader > > > > > type) do you still have to create the password hash first or does couch > > > > > now do that .... > > > > > > > > > > > > > > > > > > > > > > > > > > --505c833f_2708c9af_181cc--