couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filipe David Manana <fdman...@gmail.com>
Subject Re: Virtual Hosts
Date Fri, 19 Feb 2010 07:18:49 GMT
+1 also :)

On Fri, Feb 19, 2010 at 12:23 AM, Jan Lehnardt <jan@apache.org> wrote:

> Hi dev@,
>
> I added virtual host handling to CouchDB. I have a Github branch for you to
> check out:
>
>  http://github.com/janl/couchdb/commits/vhosts
>
> Alternatively, here's a full diff including etap tests:
>
>  http://www.friendpaste.com/6B5dQU1fb27boOvxhm2nhf
>
> From local.ini:
>
> ; To enable Virtual Hosts in CouchDB, add a vhost = path directive. All
> requests to
> ; the Virual Host will be redirected to the path. In the example below all
> requests
> ; to http://example.com/ are redirected to /database.
> ; If you run CouchDB on a specific port, include the port number in the
> vhost:
> ; example.com:5984 = /database
>
> [vhosts]
> ;example.com = /database/
>
> In combination with Benoit's rewriter, this allows you to create virtual
> hosts with
> really pretty URLs.
>
> The CouchDB default behaviour isn't changed. CouchDB simply inspects a
> request's `Host:` header and maps it against any defined virtual hosts. If
> a
> match is found, CouchDB will make an internal redirect much like the
> rewriter.
>
> I did a stupid A/B test with Apache Bench and couldn't see any performance
> degradation. Feel free to prove me wrong :)
>
> I'd like to commit this to trunk and also backport to 0.11. What do you
> think?
>
> Thanks for you feedback.
>
> Cheers
> Jan
> --
>
>


-- 
Filipe David Manana,
fdmanana@gmail.com
PGP key - http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC569452B

"Reasonable men adapt themselves to the world.
Unreasonable men adapt the world to themselves.
That's why all progress depends on unreasonable men."

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