You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by loknor <b....@mary.acu.edu.au> on 2007/11/29 00:15:23 UTC

Tomcat 6.0 with Apache 2.2 front-end

Hi,

Can anyone provide links to a few tutorials on running Tomcat 6.0 with
Apache on the front-end?  I know there are 2 recommended techniques, mod_jk
and mod_proxy.  I'd like to use mod_proxy because it appears to be easier
and I do not require a great deal of flexibility.  I'm running on Windows
Server 2003.

I have Apache Running.  I have Tomcat running (through port 8080).  I just
want to know how to communicate between them.

thanks,

Brent
-- 
View this message in context: http://www.nabble.com/Tomcat-6.0-with-Apache-2.2-front-end-tf4893923.html#a14015513
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 6.0 with Apache 2.2 front-end

Posted by David Cassidy <da...@twocats.co.uk>.
Tony,

mod_jk - which uses the ajp13 protocol is not the same as
the http11aprprotocol which uses http/1.1 as its protocol.

Filip - is there a comparison between apache talking to http to tomcat
vs apache with ajp to tomcat ?

Ta

D


On Thu, 2007-11-29 at 13:37 -0800, Tony Anecito wrote:
> Thanks Filip I am interested in that information also.
> 
> I will try to get it configured and running and give
> feedback on performance since I already use mod_jk or
> the Http11AprProtocol as I think you call it.
> 
> Regards,
> -Tony
> 
> --- Filip Hanik - Dev Lists <de...@hanik.com>
> wrote:
> 
> > the speed of the connectors are (in order)
> > 
> > Http11Protocol - Java BIO connector, no poller,
> > blocking read/write
> > Http11AprProtocol - APR connector, poller, blocking
> > read/write
> > Http11NioProtocol - Java NIO connector, poller,
> > simulated blocking 
> > read/write
> > 
> > the reason the NIO is slower, is cause it has to
> > simulate "blocking" 
> > reads and writes through a non blocking API.The
> > reason the BIO is the 
> > fastest, is cause there is no context switching
> > during block simulation, 
> > or adding/removing the connection from a poller.
> > 
> > When it comes to SSL, the APR connector is much
> > faster than both the 
> > Java connectors.
> > 
> > Filip
> > 
> > David Cassidy wrote:
> > > Has anyone got a comparison of the NIO one vs
> > standard java connectors ?
> > > both with and without the native libs ?
> > >
> > > Ta
> > >
> > >
> > > On Thu, 2007-11-29 at 08:38 -0600, Brian Millett
> > wrote:
> > >   
> > >> Filip Hanik - Dev Lists escribío:
> > >>     
> > >>> using mod_proxy_http, you want to enable
> > >>>
> > >>> ProxyPreserveHost On
> > >>>
> > >>>
> > >>> Filip
> > >>> loknor wrote:
> > >>>       
> > >>>> Filip Hanik - Dev Lists wrote:
> > >>>>  
> > >>>>         
> > >>>>> three options
> > >>>>>
> > >>>>> mod_proxy_http
> > >>>>> mod_jk
> > >>>>> mod_proxy_ajp
> > >>>>>
> > >>>>> Filip
> > >>>>>
> > >>>>>
> > >>>>>     
> > >>>>>           
> > >>>> Yep just found the other option, and a site
> > that got me up to speed very
> > >>>> quickly.  I can now communicate between Apache
> > and Tomcat. 
> > >>>>
> >
> http://blog.taragana.com/index.php/archive/5-steps-to-integrate-tomcat-55-with-apache-20
> > >>>>
> > >>>>
> > >>>> Thanks,
> > >>>>
> > >>>> Brent
> > >>>>   
> > >>>>         
> > >> I'd also recommend that you compile the apr
> > native libs for tomcat
> > >> (apache-tomcat-6.0.14/bin/tomcat-native.tar.gz)
> > and enable it when you start
> > >> tomcat by adding
> > "-Djava.library.path=/usr/local/apr/lib" (I
> > installed the lib
> > >> in /usr/local/apr/lib).
> > >>
> > >> What gives you is the apr interface for handling
> > the http connects.
> > >>
> > >> from the catalina.out:
> > >>
> > >> Nov 26, 2007 9:31:10 AM
> > org.apache.coyote.http11.Http11AprProtocol init
> > >> INFO: Initializing Coyote HTTP/1.1 on http-8080
> > >>
> > >> This handler scales and is quicker than the java
> > handler.  JBoss calls it
> > >> JBossWeb.  See
> > http://labs.jboss.com/jbossweb/index.html for a nice
> > graph of the
> > >> performance differences between the native apr &
> > java handlers.
> > >>
> > >>
> > >>     
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To start a new topic, e-mail:
> > users@tomcat.apache.org
> > > To unsubscribe, e-mail:
> > users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail:
> > users-help@tomcat.apache.org
> > >
> > >
> > >
> > >   
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To start a new topic, e-mail:
> > users@tomcat.apache.org
> > To unsubscribe, e-mail:
> > users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail:
> > users-help@tomcat.apache.org
> > 
> > 
> 
> 
> 
>       ____________________________________________________________________________________
> Be a better sports nut!  Let your teams follow you 
> with Yahoo Mobile. Try it now.  http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 6.0 with Apache 2.2 front-end

Posted by Tony Anecito <ad...@yahoo.com>.
Thanks Filip I am interested in that information also.

I will try to get it configured and running and give
feedback on performance since I already use mod_jk or
the Http11AprProtocol as I think you call it.

Regards,
-Tony

--- Filip Hanik - Dev Lists <de...@hanik.com>
wrote:

> the speed of the connectors are (in order)
> 
> Http11Protocol - Java BIO connector, no poller,
> blocking read/write
> Http11AprProtocol - APR connector, poller, blocking
> read/write
> Http11NioProtocol - Java NIO connector, poller,
> simulated blocking 
> read/write
> 
> the reason the NIO is slower, is cause it has to
> simulate "blocking" 
> reads and writes through a non blocking API.The
> reason the BIO is the 
> fastest, is cause there is no context switching
> during block simulation, 
> or adding/removing the connection from a poller.
> 
> When it comes to SSL, the APR connector is much
> faster than both the 
> Java connectors.
> 
> Filip
> 
> David Cassidy wrote:
> > Has anyone got a comparison of the NIO one vs
> standard java connectors ?
> > both with and without the native libs ?
> >
> > Ta
> >
> >
> > On Thu, 2007-11-29 at 08:38 -0600, Brian Millett
> wrote:
> >   
> >> Filip Hanik - Dev Lists escribío:
> >>     
> >>> using mod_proxy_http, you want to enable
> >>>
> >>> ProxyPreserveHost On
> >>>
> >>>
> >>> Filip
> >>> loknor wrote:
> >>>       
> >>>> Filip Hanik - Dev Lists wrote:
> >>>>  
> >>>>         
> >>>>> three options
> >>>>>
> >>>>> mod_proxy_http
> >>>>> mod_jk
> >>>>> mod_proxy_ajp
> >>>>>
> >>>>> Filip
> >>>>>
> >>>>>
> >>>>>     
> >>>>>           
> >>>> Yep just found the other option, and a site
> that got me up to speed very
> >>>> quickly.  I can now communicate between Apache
> and Tomcat. 
> >>>>
>
http://blog.taragana.com/index.php/archive/5-steps-to-integrate-tomcat-55-with-apache-20
> >>>>
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Brent
> >>>>   
> >>>>         
> >> I'd also recommend that you compile the apr
> native libs for tomcat
> >> (apache-tomcat-6.0.14/bin/tomcat-native.tar.gz)
> and enable it when you start
> >> tomcat by adding
> "-Djava.library.path=/usr/local/apr/lib" (I
> installed the lib
> >> in /usr/local/apr/lib).
> >>
> >> What gives you is the apr interface for handling
> the http connects.
> >>
> >> from the catalina.out:
> >>
> >> Nov 26, 2007 9:31:10 AM
> org.apache.coyote.http11.Http11AprProtocol init
> >> INFO: Initializing Coyote HTTP/1.1 on http-8080
> >>
> >> This handler scales and is quicker than the java
> handler.  JBoss calls it
> >> JBossWeb.  See
> http://labs.jboss.com/jbossweb/index.html for a nice
> graph of the
> >> performance differences between the native apr &
> java handlers.
> >>
> >>
> >>     
> >
> >
> >
>
---------------------------------------------------------------------
> > To start a new topic, e-mail:
> users@tomcat.apache.org
> > To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail:
> users-help@tomcat.apache.org
> >
> >
> >
> >   
> 
> 
>
---------------------------------------------------------------------
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org
> 
> 



      ____________________________________________________________________________________
Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 6.0 with Apache 2.2 front-end

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
the speed of the connectors are (in order)

Http11Protocol - Java BIO connector, no poller, blocking read/write
Http11AprProtocol - APR connector, poller, blocking read/write
Http11NioProtocol - Java NIO connector, poller, simulated blocking 
read/write

the reason the NIO is slower, is cause it has to simulate "blocking" 
reads and writes through a non blocking API.The reason the BIO is the 
fastest, is cause there is no context switching during block simulation, 
or adding/removing the connection from a poller.

When it comes to SSL, the APR connector is much faster than both the 
Java connectors.

Filip

David Cassidy wrote:
> Has anyone got a comparison of the NIO one vs standard java connectors ?
> both with and without the native libs ?
>
> Ta
>
>
> On Thu, 2007-11-29 at 08:38 -0600, Brian Millett wrote:
>   
>> Filip Hanik - Dev Lists escribío:
>>     
>>> using mod_proxy_http, you want to enable
>>>
>>> ProxyPreserveHost On
>>>
>>>
>>> Filip
>>> loknor wrote:
>>>       
>>>> Filip Hanik - Dev Lists wrote:
>>>>  
>>>>         
>>>>> three options
>>>>>
>>>>> mod_proxy_http
>>>>> mod_jk
>>>>> mod_proxy_ajp
>>>>>
>>>>> Filip
>>>>>
>>>>>
>>>>>     
>>>>>           
>>>> Yep just found the other option, and a site that got me up to speed very
>>>> quickly.  I can now communicate between Apache and Tomcat. 
>>>> http://blog.taragana.com/index.php/archive/5-steps-to-integrate-tomcat-55-with-apache-20
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Brent
>>>>   
>>>>         
>> I'd also recommend that you compile the apr native libs for tomcat
>> (apache-tomcat-6.0.14/bin/tomcat-native.tar.gz) and enable it when you start
>> tomcat by adding "-Djava.library.path=/usr/local/apr/lib" (I installed the lib
>> in /usr/local/apr/lib).
>>
>> What gives you is the apr interface for handling the http connects.
>>
>> from the catalina.out:
>>
>> Nov 26, 2007 9:31:10 AM org.apache.coyote.http11.Http11AprProtocol init
>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>>
>> This handler scales and is quicker than the java handler.  JBoss calls it
>> JBossWeb.  See http://labs.jboss.com/jbossweb/index.html for a nice graph of the
>> performance differences between the native apr & java handlers.
>>
>>
>>     
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 6.0 with Apache 2.2 front-end

Posted by David Cassidy <da...@twocats.co.uk>.
Has anyone got a comparison of the NIO one vs standard java connectors ?
both with and without the native libs ?

Ta


On Thu, 2007-11-29 at 08:38 -0600, Brian Millett wrote:
> Filip Hanik - Dev Lists escribío:
> > using mod_proxy_http, you want to enable
> > 
> > ProxyPreserveHost On
> > 
> > 
> > Filip
> > loknor wrote:
> >>
> >> Filip Hanik - Dev Lists wrote:
> >>  
> >>> three options
> >>>
> >>> mod_proxy_http
> >>> mod_jk
> >>> mod_proxy_ajp
> >>>
> >>> Filip
> >>>
> >>>
> >>>     
> >>
> >> Yep just found the other option, and a site that got me up to speed very
> >> quickly.  I can now communicate between Apache and Tomcat. 
> >> http://blog.taragana.com/index.php/archive/5-steps-to-integrate-tomcat-55-with-apache-20
> >>
> >>
> >> Thanks,
> >>
> >> Brent
> >>   
> 
> I'd also recommend that you compile the apr native libs for tomcat
> (apache-tomcat-6.0.14/bin/tomcat-native.tar.gz) and enable it when you start
> tomcat by adding "-Djava.library.path=/usr/local/apr/lib" (I installed the lib
> in /usr/local/apr/lib).
> 
> What gives you is the apr interface for handling the http connects.
> 
> from the catalina.out:
> 
> Nov 26, 2007 9:31:10 AM org.apache.coyote.http11.Http11AprProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> 
> This handler scales and is quicker than the java handler.  JBoss calls it
> JBossWeb.  See http://labs.jboss.com/jbossweb/index.html for a nice graph of the
> performance differences between the native apr & java handlers.
> 
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 6.0 with Apache 2.2 front-end

Posted by Tony Anecito <ad...@yahoo.com>.
I was interested in seeing how it compared to the
regular Apache server. I am not sure of the advantages
of combining multiple tiers. The reason to keep them
separate is to be able to scale by adding servers to a
specific tier.

My experience has been keep the tiers separate. I am
not sure how secure Tomcat is compared to Apache so
combining multiple tiers may include additional risks.

If you really want to get better performance eliminate
Apache altogether. At least that is what I have heard
here in this newsgroup.

I am down to 4.2msec round trip for my type of
requests as measured at the client and want better
than that and the conclusion is to eliminate Apache as
soon as I can find a good Blog software install for
Tomcat rather than one that uses Perl.

Regards,
-Tony

--- Brian Millett <bm...@gmail.com> wrote:

> Filip Hanik - Dev Lists escribío:
> > using mod_proxy_http, you want to enable
> > 
> > ProxyPreserveHost On
> > 
> > 
> > Filip
> > loknor wrote:
> >>
> >> Filip Hanik - Dev Lists wrote:
> >>  
> >>> three options
> >>>
> >>> mod_proxy_http
> >>> mod_jk
> >>> mod_proxy_ajp
> >>>
> >>> Filip
> >>>
> >>>
> >>>     
> >>
> >> Yep just found the other option, and a site that
> got me up to speed very
> >> quickly.  I can now communicate between Apache
> and Tomcat. 
> >>
>
http://blog.taragana.com/index.php/archive/5-steps-to-integrate-tomcat-55-with-apache-20
> >>
> >>
> >> Thanks,
> >>
> >> Brent
> >>   
> 
> I'd also recommend that you compile the apr native
> libs for tomcat
> (apache-tomcat-6.0.14/bin/tomcat-native.tar.gz) and
> enable it when you start
> tomcat by adding
> "-Djava.library.path=/usr/local/apr/lib" (I
> installed the lib
> in /usr/local/apr/lib).
> 
> What gives you is the apr interface for handling the
> http connects.
> 
> from the catalina.out:
> 
> Nov 26, 2007 9:31:10 AM
> org.apache.coyote.http11.Http11AprProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> 
> This handler scales and is quicker than the java
> handler.  JBoss calls it
> JBossWeb.  See
> http://labs.jboss.com/jbossweb/index.html for a nice
> graph of the
> performance differences between the native apr &
> java handlers.
> 
> 
> -- 
> Brian Millett - [ Ivanova, "The Geometry of
> Shadows"]
> "If it gets too bad I'll just gnaw it off at the
> ankle."
> 
> 
>
---------------------------------------------------------------------
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org
> 
> 



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 6.0 with Apache 2.2 front-end

Posted by Brian Millett <bm...@gmail.com>.
Filip Hanik - Dev Lists escribío:
> using mod_proxy_http, you want to enable
> 
> ProxyPreserveHost On
> 
> 
> Filip
> loknor wrote:
>>
>> Filip Hanik - Dev Lists wrote:
>>  
>>> three options
>>>
>>> mod_proxy_http
>>> mod_jk
>>> mod_proxy_ajp
>>>
>>> Filip
>>>
>>>
>>>     
>>
>> Yep just found the other option, and a site that got me up to speed very
>> quickly.  I can now communicate between Apache and Tomcat. 
>> http://blog.taragana.com/index.php/archive/5-steps-to-integrate-tomcat-55-with-apache-20
>>
>>
>> Thanks,
>>
>> Brent
>>   

I'd also recommend that you compile the apr native libs for tomcat
(apache-tomcat-6.0.14/bin/tomcat-native.tar.gz) and enable it when you start
tomcat by adding "-Djava.library.path=/usr/local/apr/lib" (I installed the lib
in /usr/local/apr/lib).

What gives you is the apr interface for handling the http connects.

from the catalina.out:

Nov 26, 2007 9:31:10 AM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080

This handler scales and is quicker than the java handler.  JBoss calls it
JBossWeb.  See http://labs.jboss.com/jbossweb/index.html for a nice graph of the
performance differences between the native apr & java handlers.


-- 
Brian Millett - [ Ivanova, "The Geometry of Shadows"]
"If it gets too bad I'll just gnaw it off at the ankle."


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 6.0 with Apache 2.2 front-end

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
using mod_proxy_http, you want to enable

ProxyPreserveHost On


Filip
loknor wrote:
>
> Filip Hanik - Dev Lists wrote:
>   
>> three options
>>
>> mod_proxy_http
>> mod_jk
>> mod_proxy_ajp
>>
>> Filip
>>
>>
>>     
>
> Yep just found the other option, and a site that got me up to speed very
> quickly.  I can now communicate between Apache and Tomcat.  
>
> http://blog.taragana.com/index.php/archive/5-steps-to-integrate-tomcat-55-with-apache-20
>
> Thanks,
>
> Brent
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 6.0 with Apache 2.2 front-end

Posted by loknor <b....@mary.acu.edu.au>.


Filip Hanik - Dev Lists wrote:
> 
> three options
> 
> mod_proxy_http
> mod_jk
> mod_proxy_ajp
> 
> Filip
> 
> 

Yep just found the other option, and a site that got me up to speed very
quickly.  I can now communicate between Apache and Tomcat.  

http://blog.taragana.com/index.php/archive/5-steps-to-integrate-tomcat-55-with-apache-20

Thanks,

Brent
-- 
View this message in context: http://www.nabble.com/Tomcat-6.0-with-Apache-2.2-front-end-tf4893923.html#a14018301
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 6.0 with Apache 2.2 front-end

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
three options

mod_proxy_http
mod_jk
mod_proxy_ajp

Filip

loknor wrote:
> Hi,
>
> Can anyone provide links to a few tutorials on running Tomcat 6.0 with
> Apache on the front-end?  I know there are 2 recommended techniques, mod_jk
> and mod_proxy.  I'd like to use mod_proxy because it appears to be easier
> and I do not require a great deal of flexibility.  I'm running on Windows
> Server 2003.
>
> I have Apache Running.  I have Tomcat running (through port 8080).  I just
> want to know how to communicate between them.
>
> thanks,
>
> Brent
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org