couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Weber <scotty2...@sbcglobal.net>
Subject Re: authentication_redirect is not working.
Date Sat, 19 Apr 2014 03:24:22 GMT
Thanks, Stanley.
I will use the correct tools in this case, as it is a production system.  I may play with
this idea, but it's not going into an actual system.  I agree that CouchDB shouldn't be exposed
to the world in this way. Apache and IIS are both better solutions (please don't start a debate
on Apache/IIS, I have used and am knowledgeable on both).

As Jens said, I sound like a grumpy old grandpa, which I got a good laugh from.  I'm not
a grandpa (yet), but I have worked on many projects where using new, leading edge tools were
the big fad because they are cool.  And yet, they were the wrong choice.  The end result
was unstable, under-preforming, systems and lost business. Eventually layoffs, and a lost
market place position.  All because 'them young whipper-snappers' wanted to use a production
level project as their playground and sandbox.  But they sure convinced those VP's that it
sounded good.

Yet, kids I interview from school still think they should be able to use flagship products
and customer bases as lab rats for new, bleeding edge apps.

Robert Glass has written on this topic, some of which are companies I actually worked for
and actually watched his case studies from the side lines.

Anyway, this has gone off topic.  I consider it closed.  Thanks for the comments.

-Scott





________________________________
 From: Stanley Iriele <siriele2x3@gmail.com>
To: user@couchdb.apache.org 
Sent: Friday, April 18, 2014 1:02 PM
Subject: Re: authentication_redirect is not working.
 

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