incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: JS Test Errors with Apache virtual host + reverse proxy + couchdb
Date Wed, 21 Jan 2009 00:44:37 GMT
On Tue, Jan 20, 2009 at 7:31 PM, Glenn Rempe <glenn@rempe.us> wrote:
> Hi,
>
> I am experimenting with CouchDB and wanted to setup a virtual host and
> reverse proxy in my apache server that would expose couchdb to the net, and
> allow me to easily add apache basic auth on top (with the hope that some
> couchdb ruby clients support basic auth).
>
> However, when I set this up I discovered that many of the futon JS tests
> fail when run on the proxied url, but all pass when hitting the same exact
> couchdb install via a direct url.
>
> I did not see anything about this in the bug Jira.  On initial examination
> this appears to be related to url escaping in the js tests.
>
> You can try it out for yourself if you like by visiting my currently exposed
> couchdb instance here:
>
> FAIL (10 error, 3 fail):
> http://couchdb.rempe.org/_utils/couch_tests.html?script/couch_tests.js
>
> PASS:
> http://couchdb.rempe.org:5984/_utils/couch_tests.html?script/couch_tests.js
>
> Here is the reverse proxy config for Apache that is in use:
>
> http://gist.github.com/49756
>
> QUESTIONS:
>
> - Is this simply a problem with the JS test runner?  Or does this represent
> an actual failure in the server?

There are known issues with Apache's default config for reverse
proxies screwing with url encoded slashes. This screws up path stuff
which CouchDB relies on. This is most likely the cause of your errors.

> - Is there an improved reverse proxy config that would eliminate this
> (Please feel free to fork the Gist and issue me a pull request)?

No one in IRC is speaking up, but just the other day someone was on
asking questions and managed to get it working I believe. I swear I
told him to put that config on the wiki once he got it done, so you
might check there.

> - Is there a config available now in the native couchdb web server that
> would let me force basic auth?  I saw some posts related to this but I have
> not seen any config info.
>

This one I can't answer.

> I have built and installed couchdb from repository source, so if any commits
> are made to fix I would be happy to pull them and test.
>

The last patch that would affect this was put in last night or so, but
I don't think it fixes everything that Apache breaks.

HTH,
Paul Davis

> Thanks all.
>
> Glenn
>
> --
> Glenn Rempe
> glenn@rempe.us
>
>
>

Mime
View raw message