Hi couchers Linux- and networking-noob here.
I'm having a hard time trying to get rewrites to work. My goal is this: User goes to http://artdaten.ch User gets forwarded to http://artdaten.ch/artendb/_design/artendb/index.html or better: index.html opens at http://artdaten.ch/index.html What I've done: to forward from port 80 to port 5984: iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 5984 in etc/couchdb/local.ini: port = 5984 bind_address = 0.0.0.0 in [vhost] section: artdaten.ch:5984 = /artendb/_design/artendb/_rewrite service couchdb restart in rewrites.json: [ { "from": "", "to": "index.html" } ] This works. Well, sort of: index.html opens at http://artdaten.ch/index.html. But now lots of paths aren't found, so no functionality nor stying. So I added some rules to rewrites.json: [ { "from": "", "to": "index.html" }, { "from": "favicon.ico", "to": "favicon.ico" }, { "from": "style/*", "to": "style/*" }, { "from": "images/*", "to": "images/*" }, { "from": "vendor/*", "to": "vendor/*" }, { "from": "fonts/*", "to": "fonts/*" }, { "from": "_view/*", "to": "_view/*" }, { "from": "_list/*", "to": "_list/*" }, { "from": "_updates/*", "to": "_updates/*" } ] The files in style, images, vendor and fonts are now found. But views and lists aren't. Plus pushing the couchapp with the traditional python-tool doesn't work any more. I have to comment out "artdaten.ch:5984 = /artendb/_design/artendb/_rewrite" in the vhost section of local.ini to push, reinstate vhost, then restart couchdb. Very pesky. (Plus somehow when changing rewrite rules and local.ini repeatedly I have managed to be completely refused ssh-access by my virtual server twice now...) Can you help? Alex
