couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: NGNIX as a reverse proxy and replication not working
Date Mon, 11 Jul 2011 18:15:46 GMT
On Mon, Jul 11, 2011 at 1:56 PM, Jim Klo <jim.klo@sri.com> wrote:
> Can anyone provide me with some guidance on proxying CouchDB 1.0.2 with NGINX and getting
replication to work with it? I followed the guide here http://wiki.apache.org/couchdb/Nginx_As_a_Reverse_Proxy
but replication from the proxied CouchDC isn't working...
>
> I'm able to cURL the _changes feed and perform a GET request to fetch the individual
documents using:
>
>  curl -X GET "http://ec2-174-129-59-231.compute-1.amazonaws.com:5984/node/_changes?include_docs=true"
>
> and I can even
>
>  curl -X GET "http://ec2-174-129-59-231.compute-1.amazonaws.com:5984/node/node_description
>
> But when I try to replication, either via futon or curl, I'm getting no love.  Replication
does work tho.. if I use an SSH tunnel directly from local pc to remote couch... via ssh -L
9000:localhost:5984 ...
>
> Any assistance is greatly appreciated.
>
> - Jim
>
>
> Here's my NGINX conf:
>
> user www-data;
> worker_processes  1;
>
> error_log  /var/log/nginx/error.log;
> pid        /var/run/nginx.pid;
>
> events {
>    worker_connections  1024;
>    # multi_accept on;
> }
>
> http {
>    include       /etc/nginx/mime.types;
>
>    access_log  /var/log/nginx/access.log;
>
>    sendfile        on;
>    #tcp_nopush     on;
>
>    #keepalive_timeout  0;
>    keepalive_timeout  65;
>    tcp_nodelay        on;
>
>    gzip  on;
>    gzip_disable "MSIE [1-6]\.(?!.*SV1)";
>
>    include /etc/nginx/conf.d/*.conf;
>    include /etc/nginx/sites-enabled/*;
> }
>
>
> And here's my site config which is linked within /etc/nginx/sites-enabled/:
>
>
> server {
>        listen   80 default;
>        server_name  localhost;
>
>        access_log  /var/log/nginx/learningregistry.access.log;
>
>        location / {
>                        fastcgi_pass 127.0.0.1:5000;
>                        fastcgi_param PATH_INFO $fastcgi_script_name;
>                        fastcgi_param REQUEST_METHOD $request_method;
>                        fastcgi_param QUERY_STRING $query_string;
>                        fastcgi_param CONTENT_TYPE $content_type;
>                        fastcgi_param CONTENT_LENGTH $content_length;
>                        fastcgi_param  SERVER_ADDR        $server_addr;
>                        fastcgi_param  SERVER_PORT        $server_port;
>                        fastcgi_param  SERVER_NAME        $server_name;
>                        fastcgi_param  SERVER_PROTOCOL    $server_protocol;
>                        fastcgi_pass_header Authorization;
>                        fastcgi_intercept_errors off;
>
>        }
>
>        # redirect server error pages to the static page /50x.html
>        #
>        error_page   500 502 503 504  /50x.html;
>        location = /50x.html {
>                root   html;
>        }
>
> }
>
> server {
>        listen domU-12-31-39-04-41-E2.compute-1.internal:5984;
>        server_name domU-12-31-39-04-41-E2;
>
>        location / {
>                proxy_pass http://127.0.0.1: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;
>        }
>
>        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-Real-IP $remote_addr;
>                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>        }
>
> }
>
>
> Jim Klo
> Senior Software Engineer
> Center for Software Engineering
> SRI International
>
>
>
>
>

Could you check both the source and target for logs to see if their
reporting an error of some sort?

Mime
View raw message