incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: authentication_redirect is not working.
Date Wed, 16 Apr 2014 09:08:39 GMT
On Mon, Apr 14, 2014 at 7:11 PM, Scott Weber <scotty2541@sbcglobal.net>wrote:

> I fought with:
>    / = {couch_httpd_misc_handlers, handle_utils_dir_req,
> "../share/couchdb/www/index.html"}
>
> for hours already.  it just gives me
>    " {"error":"unknown_error","reason":"function_clause"}  "
>
> The file is there, right next to favicon and all those other pages,
> because apparently this cannot refer to an attachment in a DB.
>
> I have searched for hours, and not found any useful doc on
> handle_welcome_req, handle_utils_dir_req, handle_config_req, etc...
>
>
> I have the server behind IIS, where it was forwarding every request in
> that domain back to couchDB... so I guess it's time to start looking at the
> ARR and ReWrite modules.
>
>
> -Scott
>
>
Again. Did you try the vhost + redirect rule?

What's the goal of changing this welcome message?

>
> ________________________________
>  From: Benoit Chesneau <bchesneau@gmail.com>
> To: "user@couchdb.apache.org" <user@couchdb.apache.org>; Scott Weber <
> scotty2541@sbcglobal.net>
> Sent: Monday, April 14, 2014 11:13 AM
> Subject: Re: authentication_redirect is not working.
>
>
> On Mon, Apr 14, 2014 at 5:55 PM, Scott Weber <scotty2541@sbcglobal.net
> >wrote:
>
> > No, that doesn't work.  It actually is worse.
> >
> > If I remap the vhosts to a DB/Document, it gives me the WHOLE DOCUMENT:
> > [vhosts]
> > www.mycompany.com = /login/source/
> >
> > Results:
> > www.mycompany.com  -> maps to -> www.mycompany.com/login/source/
> > (where 'login' is the landing zone, and 'source' is the document that has
> > the HTML attachment)
> >
> >
> > On the other hand, when I map it to the document like this:
> > [vhosts]
> > www.mycompany.com = /login/source/index.html
> >
> > Results:
> > www.mycompany.com   -> maps to ->
> > www.mycompany.com/login/source/index.html
> > however, now it is trying to open style sheets and js files that have the
> > name:
> >
> > www.mycompany.com/login/source/index.html.mystyle.css
> > www.mycompany.com/login/source/index.html.mainpage.js
> >
> > The obvious work around is to use the former option and mustspecify "
> > www.mycompany.com/index.html" as required on the address bar.
> >
>
>
> Actually I also mentioneed something about the rewrite.
>
> so
>
> www.mycompany.com = /db/ddoc/_rewrite
>
> and do the reqrite in it
>
> [{ "from": "/",
>    "to": /index.html
> },...]
>
> and put an index.html in your ddoc attachments.
>
>
> >
> > Which is not what is expected or were hoping for.  All other web servers
> > allow a default doc setting, typically index.html or index.htm.  Does
> > CouchDB not have something equivalent?
> >
>
> You may be able to do:
>
> / = {couch_httpd_misc_handlers, handle_utils_dir_req,
> "/path/to/index.html"}
>
>
> but it will probably break some clients and the replication.
>
> Another way is to do that on the proxy level.
>
> - benoit
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message