virtualhostfilter examples?

82 views
Skip to first unread message

Tim Williams

unread,
Oct 11, 2005, 6:49:17 AM10/11/05
to turbo...@googlegroups.com, cherryp...@googlegroups.com
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

TIA

Tim



Remi Delon

unread,
Oct 11, 2005, 3:17:49 PM10/11/05
to cherryp...@googlegroups.com
Hi Tim,
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.


Remi Delon

unread,
Oct 11, 2005, 3:18:09 PM10/11/05
to cherryp...@googlegroups.com
Hi Tim,

Tim Williams (gmail)

unread,
Oct 14, 2005, 12:10:19 PM10/14/05
to cherryp...@googlegroups.com
On 11/10/05, Remi Delon <re...@cherrypy.org> wrote:
>
> 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.

Hi Remi, thanks for the information. Please can you let me know when
Ticket #344 is resolved, and the new usage details

Tim
Reply all
Reply to author
Forward
0 new messages