couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Sphinx <chrissph...@gmail.com>
Subject Serving Simple HTML page to Public IP from CouchDB
Date Tue, 19 Mar 2013 08:32:03 GMT
I have a CouchDB running on a RPi behind a router. I've seen countless tutorials about "pretty
urls", but no matter what I do I just cannot get this to work for my public IP. All I want
to do is be able to serve a boring webpage to anyone that hits

http://my.pub.lic.ip:5984

But the only way I was able to do this is by putting the public IP under vhosts in the local.ini
file. Doing so breaks the database and I can't access it in any way until I remove the line
from the local.ini file and restart it. Trying to get at any part of the database results
in:

{"error":"not_found","reason":"Document is missing attachment"}

Sure, I can set up something like 127.0.0.1<tab>couch to hook up to http://couch:5984
on the RPi. I can even load it from another machine, but I have to set my /etc/hosts on whatever
machine I want to use to include my.pub.lic.ip<tab>couch. What if I want to allow anyone
to access the page without having to hack their /etc/hosts file? How am I supposed to set
this up?

I get the feeling that the only way to do this is to run something like ngix in front of the
database with a reverse proxy, but I'm already killing an ant with a sledgehammer and I feel
that there is just something I am overlooking here. Can anybody tell me what I'm doing wrong?
Or walk me through how to get CouchDB to serve up a webpage to a public IP?
Mime
View raw message