Three things to remember while configuring a couchapp to run as a web facing application. Below, I document the steps I took to deploy the example pages
app from couchapp.org.
-
set the vhost in
/etc/couchdb/local.ini
.[vhosts] home.btbytes.com = /pages/_design/pages/_rewrite
-
add vhosts entry to couchdb by visiting
configuration
page in futon app and adding a new section:section = vhosts option = home.btbytes.com value = /pages/_design/pages/_rewrite
-
configure nginx to proxy the requests to
/
to the port running couchdb. See reflocation / { proxy_pass http://localhost:5984; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }