couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Weber <>
Subject Re: authentication_redirect is not working.
Date Mon, 14 Apr 2014 17:11:20 GMT
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.


 From: Benoit Chesneau <>
To: "" <>; Scott Weber <>

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 <>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]
> = /login/source/
> Results:
>  -> maps to ->
> (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]
> = /login/source/index.html
> Results:
>   -> maps to ->
> however, now it is trying to open style sheets and js files that have the
> name:
> The obvious work around is to use the former option and mustspecify "
>" as required on the address bar.

Actually I also mentioneed something about the rewrite.

so = /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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message