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.