It's been a while since I last had to mess around with Nginx/sync gateway config settings, but perhaps you may want to take a look at this: Insecure mode on default sync_gateway bucket — Issue #708 — couchbase/sync_gateway <https://github.com/couchbase/sync_gateway/issues/708> ...I vaguely remember running into a similar issue as you, and I think that thread might have been what helped me resolve it.
Also, FWIW, I personally hated manually setting this stuff up, so a few months ago I made a little repo that shows how to automagically set up an auto-scaling cluster of CoreOS machines running Couchbase and Sync Gateway nodes behind Nginx on AWS using Terraform: couchbase-sync-gateway-terraform <https://github.com/PaulCapestany/couchbase-sync-gateway-terraform> On Wednesday, December 23, 2015 at 8:12:39 AM UTC-8, Todd Freese wrote: > > Yes, I saw that and I'm using the recommended config. > > I need to proxy the admin port for internal use. I make a lot of calls to > the admin port for management of SG using the REST api. > > Does the admin port need any additional Nginx config options? > > Todd > > > > On Tuesday, December 22, 2015 at 11:16:45 PM UTC-6, Paul Capestany wrote: >> >> I guess you'd already taken a look at Couchbase's Deploying and >> configuring nginx >> <http://developer.couchbase.com/documentation/mobile/current/develop/guides/sync-gateway/nginx/configuring-nginx-for-sync-gateway/index.html> >> developer >> docs? >> >> Seems like you're using port 4985 instead of 4984? >> >> >> On Tuesday, December 15, 2015 at 9:13:09 AM UTC-8, Todd Freese wrote: >>> >>> I have a EC2 node with SG running and want to use Nginx to act as a >>> proxy for requests to the admin port on the SG. Both are running off the >>> same EC2 node. However, any requests to the proxy returns a 502 error. >>> >>> Here is my Nginx settings: >>> >>> upstream sync_gateway { >>> >>> server 127.0.0.1:4985; >>> >>> } >>> >>> >>> server { >>> >>> listen 80; >>> >>> server_name dl.mydomain.com; >>> >>> >>> location / { >>> >>> >>> 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; >>> >>> >>> } >>> >>> } >>> >>> >>> Do I need to add any thing else to this? >>> >>> >>> I know my SG is setup correctly, as requests directly to 127.0.0.1:4985 >>> work fine. But request to 127.0.0.1:80 return 502. >>> >>> >>> Todd >>> >> -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/6a55468c-6f4e-4ac9-87db-e3ea2ddce809%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
