incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Iriele <siriele...@gmail.com>
Subject Re: authentication_redirect is not working.
Date Fri, 18 Apr 2014 18:02:39 GMT
I've personally used the vhosts +rewrites to solve a similar problem but I
used an internal show function in the ddoc as my web navigation...lastly
all of my attachments/ web pages were in 1 ddoc. And unsafe- rewrites were
enabled... A little proxy for really crazy requests and you're pretty much
good to go... Not that I'm in favor of exposing couch to the world for
crazy websites but you can do what you're trying to do
On Apr 18, 2014 6:56 AM, "Scott Weber" <scotty2541@sbcglobal.net> wrote:

> Yes, I tried to implement the vhost and redirect. vhost was behaving as
> documented. The redirect was not. There was no change in behavior.
>
> The purpose is that I was led to believe that this server would eliminate
> the need for a public facing general web server. As such, real domains show
> you actual content at their root level, not a dry "welcome to couchdb"
> message.
>
> I can see that this is not such a good idea, for a number of reasons.
> Fortunately I have already placed it in a farm behind a formal server, and
> can control access through rewrites and server side scripts. It turned into
> a classic example of using a tool for what it is good at, not trying to
> make it into something it is not designed for.
>
> -Scott
>
>
>
>
> ________________________________
>  From: Benoit Chesneau <bchesneau@gmail.com>
> To: "user@couchdb.apache.org" <user@couchdb.apache.org>; Scott Weber <
> scotty2541@sbcglobal.net>
> Sent: Wednesday, April 16, 2014 4:08 AM
> Subject: Re: authentication_redirect is not working.
>
>
> 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