I am facing a curious problem. I have a couchApp hosted on Iris couch. I purchased a domain name from godaddy and set my CNAME (WWW) to my database address on iris couch.When I type my domain name in the browser I get a couch db message
{"couchdb":"Welcome","version":"1.2.0"}
Now when I try to map my domain name (www.example.com) to vhosts
/dbname/_design/dname/_rewrite
it does not work.
My rewrites.json is defined as follows
[
{
"from": "/home",
"to": "_list/listRecentPostsHome/recentPosts",
"method": "GET",
"query": {
"reduce": "false",
"descending": "true",
"limit": "10"
}
}
]
When I point my browser to address like this
http://www.example.com/dbname/_design/dname/_rewrite/home
it works.
However this
http://www.example.com/home
does not. I was hoping that the above url would work? What am I doing wrong?
I am guessing that there is some problem with vhosts configuration.
All right this was a bit confusing.After talking to the guys at iris couch here
https://getsatisfaction.com/iriscouch/topics/vhosts_configuration_not_working_on_couchdb
I found out that I was entering my domain name incorrectly in the vhosts configuration.There is no need for "http://".After changing this to just "www.mydomain.com" it worked.