CouchDB proxy? Apache As a Reverse Proxy?

2020-07-17 06:04发布

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?

2条回答
不美不萌又怎样
2楼-- · 2020-07-17 06:21

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.

查看更多
够拽才男人
3楼-- · 2020-07-17 06:46
  • 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!

查看更多
登录 后发表回答