Changed vhost and rewrite in CouchDB and can't access the internal API -
Changed vhost and rewrite in CouchDB and can't access the internal API -
i wanted map custom domain design document _rewrite.
// configuration vhosts www.myapp.com /myapp/_design/user/_rewrite // rewrites [{ "from": "", "to": "static/browser/index.html" }, { "from": "*", "to": "*" }] the first route works fine. can access index.html www.myapp.com. however, can't access www.myapp.com/_utils. says _all_dbs can't found in browser console. other apis stop working well.
i guess because path converted /myapp/_design/user/_utils.
how can prepare this?
_utils , other "special" paths not cooperate vhosts well. lastly checked (version 1.0.2 think), _utils display futon ui ajax calls _all_dbs , others fail , total mess.
i suggest strict separation between app , internal management. utilize vhost application, always avoid vhosts when accessing futon or other tools.
there few tricks avoid vhost.
use server ip address instead of domain name:http://1.2.3.4:5984 use different port if possible: http://www.myapp.com:5984 or https://www.myapp.com:6984 add alternative dns entry pointing same couch , utilize that: http://futon.myapp.com add dot @ end of domain. http://www.myapp.com./ — sneaky (or clever). valid dns name couchdb treats differently www.myapp.com hence not trigger vhost. couchdb
Comments
Post a Comment