You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andy Savage <an...@bluewire.net.nz> on 2004/11/17 04:05:34 UTC

Cocoon and VirtualHosts - Big problem!

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: andy@bluewire.net.nz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Cocoon and VirtualHosts - Big problem!

Posted by Christofer Dutz <du...@c-ware.de>.
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: andy@bluewire.net.nz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Cocoon and VirtualHosts - Big problem!

Posted by Ugo Cei <ug...@apache.org>.
Il giorno 17/nov/04, alle 04:05, Andy Savage ha scritto:

> 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).

Are you sure you really want to do this? I usually use a single Tomcat
instance to host many different Cocoon webapps, each in its own vhost.
I find it much easier to manage this way, even if it probably requires
to have a lot more memory. But memory is much cheaper than the time I
would spend trying to have multiple, unrelated, websites in a single
Cocoon instance.

        Ugo

-- 
Ugo Cei - http://beblogging.com/

Re: Cocoon and VirtualHosts - Big problem!

Posted by Ugo Cei <ug...@gmail.com>.
Il giorno 17/nov/04, alle 04:05, Andy Savage ha scritto:

> 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).

Are you sure you really want to do this? I usually use a single Tomcat 
instance to host many different Cocoon webapps, each in its own vhost. 
I find it much easier to manage this way, even if it probably requires 
to have a lot more memory. But memory is much cheaper than the time I 
would spend trying to have multiple, unrelated, websites in a single 
Cocoon instance.

	Ugo

-- 
Ugo Cei - http://beblogging.com/


Re: Cocoon and VirtualHosts - Big problem!

Posted by go...@osmosis.gr.
we serve several domains in the same box using apache at front
take a look here:
http://wiki.apache.org/cocoon/VirtualHost

--stavros



On Wed, 17 Nov 2004, 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: andy@bluewire.net.nz
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org