The Abstract Truth

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": "/*" }

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: