You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Hernan Cunico <hc...@gmail.com> on 2006/10/30 19:58:01 UTC

Configuring Virtual Host on Geronimo - Jetty

Hi All,
here is an update to the doc, I just found out how easy is to configure a Virtual Host in Geronimo-Jetty. Here is the link to the doc

http://cwiki.apache.org/GMOxDOC11/configuring-virtual-hosts-in-geronimo-jetty.html

Am I missing something in the conf? this just look too simple compared to the Geronimo-Tomcat conf -> http://cwiki.apache.org/GMOxDOC11/configuring-virtual-hosts-in-geronimo-tomcat.html

Comments welcome.

Cheers!
Hernan

Re: Configuring Virtual Host on Geronimo - Jetty

Posted by Jeff Genender <jg...@apache.org>.

Hernan Cunico wrote:
> It would be cool if we would only had to tell VH and port in the
> deployment plan (easier for migration), then G should know how to apply
> that conf to the specific Jetty or Tomcat containers used. This goes
> along with the hope of not making the config.xml more complex ;-)

Single answer: console ;-)

Re: Configuring Virtual Host on Geronimo - Jetty

Posted by Hernan Cunico <hc...@gmail.com>.
Thanks for clarifying Jeff.
yup, although looks simpler in Jetty, in Tomcat looks more robust.

It would be cool if we would only had to tell VH and port in the deployment plan (easier for migration), then G should know how to apply that conf to the specific Jetty or Tomcat containers used. This goes along with the hope of not making the config.xml more complex ;-)

There is a JIRA already for deploying to a particular port (GERONIMO-2488), it would be great if we could select or type the host name there too ;-)

Cheers!
Hernan

Jeff Genender wrote:
> Tomcat and Jetty architectures are completely different.
> 
> For Jetty an app can have multiple hosts, but in Tomcat the opposite is
> true, where a host can have multiple apps.  Their web app --> host
> mappings are the exact opposite.
> 
> They each have their advantages and disadvantages.  If you are looking
> to just set up a virtual host, then yes, Jetty filters the web app based
> on the VH name...that's an advantage in its simplicity.  It also allows
> the application to answer to different hosts (I mean this beyond just a
> virtual host).  However you are not able to apply security,
> interceptors, clustering at a purely host level...thats the disadvantage.
> 
> Tomcat's host as a parent object allows you apply interceptors (valves),
> realms/security, and clustering purely at a host level.  Therefore, if I
> am hosting multiple companies, I can ensure that their applications fall
> under the same security/logging/interceptor model and all applications
> underneath that host can inherit this model.  That is the advantage of
> Tomcat.  The disadvantage is that object model is a bit more complex to
> setup.  Let this be known that about the same amount of configuration is
> necessary in normal Tomcat (i.e. you need to add a Host declaration to
> the server.xml file).
> 
> It would be nice to get a portlet in the console to allow you to
> dynamically create/remove hosts...something that I think would not be a
> huge amount of work, which would level the playing field a bit for
> configuring simplicity on both containers.
> 
> It is also possible to make Tomcat nearly as simple as Jetty by creating
> a VirtualHost valve that can filter what it answers to hosts in the URL.
>  But this would be confusing as it can only apply to a default host
> (that answers to anything) and would cause problems when people start
> adding Host GBeans.
> 
> Jeff
> 
> Hernan Cunico wrote:
>> Hi All,
>> here is an update to the doc, I just found out how easy is to configure
>> a Virtual Host in Geronimo-Jetty. Here is the link to the doc
>>
>> http://cwiki.apache.org/GMOxDOC11/configuring-virtual-hosts-in-geronimo-jetty.html
>>
>>
>> Am I missing something in the conf? this just look too simple compared
>> to the Geronimo-Tomcat conf ->
>> http://cwiki.apache.org/GMOxDOC11/configuring-virtual-hosts-in-geronimo-tomcat.html
>>
>>
>> Comments welcome.
>>
>> Cheers!
>> Hernan
> 

Re: Configuring Virtual Host on Geronimo - Jetty

Posted by Jeff Genender <jg...@apache.org>.
Tomcat and Jetty architectures are completely different.

For Jetty an app can have multiple hosts, but in Tomcat the opposite is
true, where a host can have multiple apps.  Their web app --> host
mappings are the exact opposite.

They each have their advantages and disadvantages.  If you are looking
to just set up a virtual host, then yes, Jetty filters the web app based
on the VH name...that's an advantage in its simplicity.  It also allows
the application to answer to different hosts (I mean this beyond just a
virtual host).  However you are not able to apply security,
interceptors, clustering at a purely host level...thats the disadvantage.

Tomcat's host as a parent object allows you apply interceptors (valves),
realms/security, and clustering purely at a host level.  Therefore, if I
am hosting multiple companies, I can ensure that their applications fall
under the same security/logging/interceptor model and all applications
underneath that host can inherit this model.  That is the advantage of
Tomcat.  The disadvantage is that object model is a bit more complex to
setup.  Let this be known that about the same amount of configuration is
necessary in normal Tomcat (i.e. you need to add a Host declaration to
the server.xml file).

It would be nice to get a portlet in the console to allow you to
dynamically create/remove hosts...something that I think would not be a
huge amount of work, which would level the playing field a bit for
configuring simplicity on both containers.

It is also possible to make Tomcat nearly as simple as Jetty by creating
a VirtualHost valve that can filter what it answers to hosts in the URL.
 But this would be confusing as it can only apply to a default host
(that answers to anything) and would cause problems when people start
adding Host GBeans.

Jeff

Hernan Cunico wrote:
> Hi All,
> here is an update to the doc, I just found out how easy is to configure
> a Virtual Host in Geronimo-Jetty. Here is the link to the doc
> 
> http://cwiki.apache.org/GMOxDOC11/configuring-virtual-hosts-in-geronimo-jetty.html
> 
> 
> Am I missing something in the conf? this just look too simple compared
> to the Geronimo-Tomcat conf ->
> http://cwiki.apache.org/GMOxDOC11/configuring-virtual-hosts-in-geronimo-tomcat.html
> 
> 
> Comments welcome.
> 
> Cheers!
> Hernan