The Abstract Truth

Archive for February, 2013

How to setup a vhost for a CouchDB couchapp

Posted by rbpasker on February 13, 2013

This is a tutorial for people who already know CouchDB and have their couchapps inside the database.

without vhosts, you reference your apps via this URL scheme:

If you want the app to show up like this:

here are the instructions (specific to

1. create a CNAME on your DNS server:        CNAME

2. map the CNAME to your app’s design design document’s rewrite rules


and create an entry that looks like this: -> /mydatabase/_design/app/_rewrite

3. create rewrite rules that look like this:

    {"from": "/","to": "/index.html"},
    {"from": "/*","to": "/*" }

Posted in tech | Leave a Comment »

%d bloggers like this: