couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Copenhaver <sean.copenha...@gmail.com>
Subject Re: Redirect the welcome page without breaking Futon?
Date Sat, 09 Apr 2011 23:02:56 GMT
You can actually setup virtual hosts and url rewrites inside CouchDB to allow you to pretty
much map any URL to a doc or function that you want. It may allow you to go without nginx
or with little relying on it:

http://blog.couchbase.com/whats-new-in-apache-couchdb-0-11-part-one-nice-urls


-- 
Sean Copenhaver

On Saturday, April 9, 2011 at 6:04 PM, Hendrik Jan van Meerveld wrote:
Hi Couch users,
> 
> For my new Couchdb website I am looking to a way to achieve the following.
> I would like my visitors to just type "http://www.mysite.com/" and be
> redirected to another page.
> 
> Using Nginx as a reverse proxy works if I use the following rewrite:
> 
> location / {
> rewrite ^ /mydatabase/_design/main/_show/blah/home permanent;
>  proxy_pass http://localhost:5984;
> proxy_redirect off;
>  proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>  }
> 
> The problem with this approach is that Futon starts complaining because the
> welcome page is no valid JSON anymore.
> 
> 
> Is there a way to redirect "http://www.mysite.com" and still keep Futon
> working.
> 
> 
> Thanks for any help.
> Kind regards,
> Hendrik Jan
> 

Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message