4

I have VM (Ubuntu 10.04, Apache, CouchDB 1.0, ...) with public ip address.

  • Is it possible to access CouchDB (mainly Futon) from public ip address (i.e. 187.323.132.232:5984), not from http://localhost:5984?
  • Or on my local machine, set up an ssh tunnel?
Blagun
  • 41
  • 3

2 Answers2

2
  • Yes, go to the Futon Configuration and set bind_address in the http section to 0.0.0.0

    • Alternatively, you can use SSH also. The basic idea is to forward from your local machine to the remote CouchDB:

      ssh -L 5984:localhost:5984 remoteuser@remotemachine

    Now you can access Futon via http://localhost:5984/ from the local machine.

Good luck!

JasonSmith
  • 72,674
  • 22
  • 123
  • 149
2

You can also proxy via Apache:

    ProxyRequests Off

    <Proxy *>
            Order deny,allow
            Allow from all
    </Proxy>

    ProxyPass / http://localhost:5984/
    ProxyPassReverse / http://localhost:5984/

You should also be able to do this with the [P] flag on a RewriteRule, presuming mod_proxy has been enabled.

temujin9
  • 101
  • 1
  • 2
  • In which file do I have to setup this config? – Jaseem Feb 07 '12 at 18:03
  • @Jaseem Setup the configuration in a new config file in this directory /etc/apache2/sites-available/. I wrote a guide on how to configure Apache2 as reverse proxy for a Tomcat 7 server. Since it is HTTP forwards it will work exactly the same with CouchDB or any other HTTP server. http://macgyverdev.blogspot.se/2014/02/apache-web-server-as-reverse-proxy-and.html – Johan Norén Feb 12 '14 at 10:58