[BlueBream] handling URLs for multiple sites in single bluebream instance

Thierry Florac thierry.florac at onf.fr
Fri Jun 17 08:31:02 EDT 2011

Le Fri, 17 Jun 2011 16:47:59 +0530,
Joshua Immanuel <josh at hipro.co.in> a écrit :

> In order to serve the same application to multiple clients,
> I've added a container named say 'Site' to the root and made them as
> sites by site.setSiteManager(LocalSiteManager(site)).  So, the root
> may contain many of those 'Site' containers say 'site1', 'site2',
> etc. and the application specific objects/containers resides under
> them.
> The application specific URL say "/container1/object1/@@add.html"
> would now become "/site1/container1/object1/@@add.html" for 'site1'
> and "/site2/container1/object1/@@add.html" for 'site2' etc. depending
> on which client (site) is being served. So, how should the URLs be in
> the templates? Or in other words, how to handle URLs for multiple
> clients (sites) for the same application.
> If anyone can explain or point me to some documentation related to
> this, it would be very helpful.


I guess you just want to do virtual hosting inside a single BlueBream
application server...
The simplest way to handle such a configuration is to "hide" the BB
server behind (for example) an Apache HTTP server with rewrite rules.

For example :

<VirtualHost w.x.y.z:80>
    ServerName    www.site1.org
    RewriteEngine on
    RewriteRule   /(.*)    http://localhost:8080/site1/++vh++http:%{SERVER_NAME}:80/++/$1 [P,L]

and idem for site2.

Given this configuration, any call to absoluteUrl(object,request) will
retrieve a good URL matching the given site.

With hope this helps...

  Chef de projets internet/intranet
  Office National des Forêts
  Département Informatique
  2, Avenue de Saint Mandé
  75570 PARIS Cedex 12

  Tél. : 01 40 19 59 64
  Fax. : 01 40 19 59 85
  Mél. : thierry.florac at onf.fr
  WWW  : http://www.onf.fr

More information about the bluebream mailing list