Re: Cocoon 3.0 components

gelo1234 <[email protected]>
Newsgroups gmane.text.xml.cocoon.user
Message-ID <CAPJaKUr6qsQDzN3MYB2O1=Je74S5jMQ90oVKV6VC5+hF9C5rww@mail.gmail.com>
> I've got Cocoon site that hosts multiple www domains, all based on the
>> same sitemap.xmap with <map:mount uri-prefix="" src="domain_X"
>> check-reload="yes"/>
>>
>> so the configuration is as follows:
>>
>> <map:pipeline>
>>               <map:select type="cutomDomainSelector">
>>                        <map:when test="domainA">
>>                             <map:mount uri-prefix="" src="./domaina"
>> check-reload="yes"/>
>>                        </map:when>
>>                        <map:when test="domainB">
>>                              <map:mount uri-prefix="" src="./domainb"
>> check-reload="yes"/>
>>                        </map:when>
>>                </map:select>
>> </map:pipeline>
>>
>> Is it still possible with C3 ? Or should I use some separate blocks
>> config ?
>> The problem with separate blocks config is that I want to use empty URI
>> (not different) for each site
>>
>> So
>> site1: http://www.domainA.org/
>> site2: http://www.domainB.org/
>>
>> NOT
>>
>> http://www.some.org/domainA/
>> http://www.some.org/domainB/
>>
>> under one C3 war (sitemap.xmap config).
>>
>
> I'd suggest to empower some reverse proxy in order to make things easier
> here.
>

Reverse Proxy would give the opposite effect - collecting into one URL from
multiple domain servers. I would like to have
only ONE backend server that serves as the origin for multiple domains.

With mod_jk/mod_proxy I can setup multiple workers for each domain but
where should I point them to serve my clients if having only one backend
server with C3 ?


Lets say I have a separate Cocoon block for each www domain. In C2.1 I had
a MAIN sitemap.xmap (Controller) that controlled which context to mount
upon different Hostname requests.

In C3 the only way I could achieve that is passing through with each
request INFO about Hostname value. That is not very elegant
solution. But I cannot find any other.

So either every <map:match ...> would need additional <map:select ...>:

 <!--  e.g. the main / context -->

   <map:match pattern="">
       <map:select value="{jexl:cocoon.request.hostName}">
          <map:when equals="domainA">
            <map:generate src="files/domainA/homepage.xml" />
            <map:transform src="files/xslt/homepage.xslt"/>
            <map:serialize />
          </map:when>
          <map:when equals="domainB">
            <map:generate src="files/domainB/homepage.xml" />
            <map:transform src="files/xslt/homepage.xslt"/>
            <map:serialize />
          </map:when>
  </map:match>

OR (a little bit more elegant and compact):

<map:match pattern="">
            <map:generate
src="files/{jexl:cocoon:request.hostName}/homepage.xml"/>
            <map:transform src="files/xslt/homepage.xslt"/>
            <map:serialize />
  </map:match>

I don't want to handle 100 VMs with C3 app for each www domain. That would
be very resource-expensive config.

I would like to have only ONE C3 app for all www domains.

Greetings,
Greg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.