I hat several problems when trying to host several virtual-hosts with one tomcat/cocoon instance when using Apache.
At the moment I simply kicked it out of the chain and modified my sitemap.
At the moment all requests to my servers are processed the folowing way. Cocoon gets the request and gets the virtual-hosts name and redirects to the sub-sitemap contained in /opt/domains/{virtual-host-name}/ it seems to work without any problems. Ant it is as easy to manage as you can get. When using Apache you will always have to modify the httpd.conf and reload the config. in my way you only have to add, remove or change a directory name.


Here the core sitemap snipet you might be interested in, not much, but it does the job for me:
<map:pipelines>
<map:component-configurations>
<global-variables>
<domains-home-dir>/opt/domains</domains-home-dir>
</global-variables>
</map:component-configurations>
<map:pipeline>
<map:match pattern="**">
<map:mount uri-prefix="" src="{global:domains-home-dir}/{request-header:Host}/sitemap.xmap"/>
</map:match>
</map:pipeline>
</map:pipelines>


Hope this could help you.
   Christofer

Andy Savage wrote:

Hello Guys

I'm having a real issue!! I swear I'm about to go insane if I can't make some progress. Basically, I'm a web host attempting to setup shared Tomcat/Cocoon access (only installing one instance but sharing it between different customers).

I've setup Apache2 via VirtualHosts to pass the appropriate request onto Tomcat using mod_jk2. Tomcat understands these and on it's own appears to work fine. I'm unsure how to go about this when adding cocoon to the mix. I had a good read of the Wiki and it appeared that I had found some helpful documentation.

Firstly I read over the VirtualHosts tutorial using the WildCardHost Matcher (http://wiki.apache.org/cocoon/VirtualHostingHostMatcher). However the issue with this is the fact that the setup is /username/sitename/public_html (eg /bob/bob.com/public_html
Therefore, Cocoon would have no idea what the username is. I will be writing a tool to automate editing of the sitemap.xmap file, once I get it working, so adding a host entry for each person is fine with me.


Currently, I have cocoon set as the default site in Tomcat. So, if I were to goto bob.com it would send the request to Tomcat which would send it to the default handler of cocoon. Cocoon however doesn't seem to understand any hosts apart from the default one. I have setup the sitemap using one host via the wiki tutorial (http://wiki.apache.org/cocoon/HostSelector). But to no avail, when I goto the site bob.com it simply hits me with the default cocoon page.

What's the next step? Any ideas why it's doing this? I really need some help here as I'm still learning how to use cocoon.

Kind Regards,
Andy Savage

--
Bluewire Solutions
Position: Partner
Contact: +64 27 4678 262
Website: www.bluewire.net.nz
Email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to