apache / couchdb

Seamless multi-master syncing database with an intuitive HTTP/JSON API, designed for reliability
https://couchdb.apache.org/
Apache License 2.0
6.17k stars 1.02k forks source link

Unix domain socket support #5177

Open hkcomori opened 4 weeks ago

hkcomori commented 4 weeks ago

Summary

I want to run CouchDB behind a reverse proxy by listening to the unix domain socket.

Desired Behaviour

[chttpd]
bind_address = /path/to/couchdb.sock

or

[chttpd]
socket_path = /path/to/couchdb.sock

Then CouchDB will accept requests from /path/to/couchdb.sock.

Possible Solution

Additional context

This is because I want to run CouchDB on a shared host where I can't have exclusive access to any ports.

nickva commented 3 weeks ago

Thanks, @hkcomori. That might work, seeing as Erlang supports unix sockets https://www.erlang.org/doc/apps/kernel/inet#t:local_address/0, and assuming mochiweb will transparently pass it through.