As an update to this, I basically can't find any way to get Couchbase to
work behind Nginx unless I specifically use port 8091.
On Thursday, May 7, 2015 at 10:40:31 PM UTC-4, Suresh Joshi wrote:
>
> I've seen this topic mentioned once or twice, but never saw it resolved.
> I'm trying to put Couchbase and Sync Gateway behind Nginx.
>
> With the below config, sync gateway works correctly, and Couchbase -seems-
> to work, except I get a 404 on login, and can never login. If I set
> Couchbase to be my root URL, it works fine. By the way, the headers I
> originally set for the DB location started off few and far between, but
> reading over the internet, I just started adding!
>
> Thanks!
> -SJ
>
> upstream couchbase_admin {
> server localhost:8091;
> }
>
> upstream couchbase_api {
> server localhost:8092;
> }
>
> upstream sync_gateway {
> server localhost:4984;
> }
>
> server {
> listen 80;
> server_name example.net;
> client_max_body_size 20m;
>
> location /db/ {
> proxy_pass http://couchbase_admin/;
>
> proxy_set_header Authorization $http_authorization;
> proxy_pass_header Authorization;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_set_header X-Forwarded-Proto $scheme;
> proxy_set_header Host $http_host;
> proxy_set_header X-Real-IP $remote_addr;
> }
>
> location /api/ {
> proxy_pass http://couchbase_api/;
> }
>
> location /sync/ {
> proxy_pass http://sync_gateway/;
> proxy_pass_header Accept;
> proxy_pass_header Server;
> proxy_http_version 1.1;
> keepalive_requests 1000;
> keepalive_timeout 360s;
> proxy_read_timeout 360s;
> }
> }
>
>
--
You received this message because you are subscribed to the Google Groups
"Couchbase" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.