Google Groups Home
Help | Sign in
Message from discussion virtualhostfilter examples?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Remi Delon  
View profile
 More options Oct 11 2005, 3:17 pm
From: "Remi Delon" <r...@cherrypy.org>
Date: Tue, 11 Oct 2005 20:17:49 +0100
Local: Tues, Oct 11 2005 3:17 pm
Subject: Re: [cherrypy-users] virtualhostfilter examples?
Hi Tim,

> I'm considering TurboGears for an upcoming project and am putting together
> some test code.   For various reasons I need several domains to point to
> different parts of a single website structure as well as to their own
> "homepage"   EG

> http://www.mydom1.com  ->  root
> http://www.mydom2.com  ->  root/mydom2/
> http://www.mydom3.com  ->  root/mydom3/
> http://www.mydom4.com  ->  under construction page

> but also to have  http://www.mydom1.com/mydom2/  etc to be vaild pages in
> their own right

> I gather I would use virtualhostfilter but are there any examples or
> snippets out there that would quickstart my tests (I didn't find its use
> obvious from the docs) ?     Or do you have any suggestions for its use?

> I will be using CP as the front-end server and not placing it behind
> Apache
> etc

virtualHostFilter is not well-documented yet but here is how you use it:

cherrypy.config.update({
   'http://mydom2.com': {
       'virtualHostFilter.on': True,
       'virtualHostFilter.prefix': '/mydom2'},
   'http://mydom3.com': {
       'virtualHostFilter.on': True,
       'virtualHostFilter.prefix': '/mydom3'},

})

However,this won't work with the current 2.1-rc2 release because specifying
canonical paths for config keys is broken in this version ...
I'll try to fix it tomorow.

Remi.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google