couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sinan Gabel <sinan.ga...@gmail.com>
Subject Re: Problems with continuous replication while using NginX as an SSL proxy for a subdirectory
Date Thu, 12 Jan 2017 09:23:18 GMT
Hi,

Looks fine except there is a missing:  proxy_set_header X-Forwarded-Ssl on;
in the _changes part.

I would start by removing the rewrite and the SSL and test, then add the
SSL and test, and finally add the rewrite and test.

Best regards,


On 12 January 2017 at 00:07, Doug Snyder <webcoach101@gmail.com> wrote:

> I've got what I think is a common use case,
> I'm following the directions for using NginX as a proxy here:
> https://cwiki.apache.org/confluence/display/COUCHDB/Nginx+as+a+proxy
> They are almost good enough.
> They explain how to make a proxy using a subdirectory
> and they also explain how to give special treatment for the _changes url to
> ensure that continuous replication works OK.
> But they don't explain how to do both of those simultaneously.
> Perhaps they thought it was obvious? So did I, but what I did doesn't work.
> I've got regular REST calls to the non-_changes API working over SSL
> but continuous replication fails ( with out an error )
> and when I curl:
> $ curl http://user:pswd@example.com/couchdb/my_db/_changes
> Gives an nginx html error:
> <h1>Not Found</h1><p>The requested URL /couchdb/my_db/_changes was
not
> found on this server.</p>
> So the URL handling in my .conf file isn't right.
> Here's what I have under the server block of my sites-enabled .conf file :
>
>
>
> location /couchdb {
>
>             rewrite /couchdb(.*) /$1 break;
>
>             proxy_pass http://localhost:5984;
>
>             proxy_redirect off;
>
>             proxy_set_header Host $host;
>
>             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>
>              proxy_set_header X-Forwarded-Ssl on;
>
>     }
>
>   location ~ ^/couchdb/(.*)/_changes {
>
>             rewrite /couchdb(.*) /$1 break;
>
>             proxy_pass http://localhost:5984;
>
>             proxy_redirect off;
>
>             proxy_buffering off;
>
>             proxy_set_header Host $host;
>
>             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>
>   }
>
> If some one spots what I'm doing wrong please let me know
>
> Best,
>
> Doug
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message