Question

I want the same instance of couchdb to listen on ports 5984 and 5985.

I want this because it allows others in the same team to run different instances of couchdb for development and test frameworks, while sharing the same settings.

I'm considering writing a little node thing, I also briefly looked into portmap/rpcbind.

What's a good way to do this?

I'm on OSX.

My couchdb is listening on 5985 now so I tried this, but that didn't work:

sudo ipfw del fwd 127.0.0.1,5985 tcp from me to 127.0.0.1 dst-port 5984
Was it helpful?

Solution

One way to do that is to have a reverse HTTP proxy running on the 2nd port and redirecting to the first. You could use Nginx or Apache.

Another option is using iptables to do the redirecting. This option is best from a performance standpoint but not very portable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top