You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by leo leonid <te...@leonid.de> on 2002/12/05 15:56:00 UTC
[SUMMARY] Complicated setup
If you want to connect Cocoon with Apache httpd in order to serve
static/legacy content directly from Apache you have three possibilities
ATM (apart from the obsolete Jserv):
a) mod_webapp
b) mod_jk
c) mod_jk2
(A)
mod_webapp______________________________________________________________
____
mod_webapp communicates via the new WARP protocol, using Tomcats
WarpConnector. You can easily mount whole webapps/contexts.
+ easy setup
- not as stable as JK1.2
- poor differentiation concerning mounts
- no load balancing
- not suitable for Windows
- not suitable for Jetty
Sample: mounting cocoon as http://host.domain.tld/cocoon/
WebAppConnection warpConnection warp localhost:8008
WebAppDeploy cocoon warpConnection /cocoon/
Sample: mounting cocoon as http://host.domain.tld/
WebAppConnection warpConnection warp localhost:8008
WebAppDeploy cocoon warpConnection /
# Problem: now EVERYTHING is served by cocoon. No way to serve
static/legacy content by Apache!
docs: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/
connectors.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/webapp.html
(B)
mod_jk__________________________________________________________________
____
mod_jk communicates via ajp1.3 protocol using an Ajp13Connector
+ very stable
+ supports load balancing
+ works with Jetty
- long winded setup
- poor syntax in mount directives
- Maintenance of mounts needs changes to httpd.conf
mod_jk is configured by a configuration file named workers.properties:
### sample for workers.properties ###
workers.apache_log=/usr/local/apache2/logs/
workers.tomcat_home=/usr/jakarta/catalina
workers.java_home=/usr/java/current
ps=/
# Define 3 workers, 2 real ajp13 and one being a loadbalancing worker
worker.list=worker1 worker2
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=host1.domain.tld
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300
# Set properties for worker2 (ajp13)
worker.worker2.type=ajp13
worker.worker2.host=host2.domain.tld
worker.worker2.port=8009
worker.worker2.lbfactor=50
worker.worker2.cachesize=10
worker.worker2.cache_timeout=600
worker.worker2.socket_keepalive=1
worker.worker2.socket_timeout=300
# Set properties for worker3 (lb) which use worker1 and worker2
worker.worker3.balanced_workers=worker1,worker2
#### end of sample ###
in you httpd.conf you put your mount directives like
# mounting only the index
JkMount / worker2
# further, for example for mounting all html files
JkMount /*.html worker2
# further, for example for mounting everything in dir
JkMount /dir/* worker2
Things that unfortunately *DON’T* work!
JkMount */dir/ worker2
JkMount **/dir/ worker2
JkMount /dir1/**/dir/ worker2
JkMount /dir1/*/dir/*/*.html worker2
JkMount /!(images|movies|audio)* worker2
docs: http://www.onjava.com/pub/a/onjava/2002/11/20/tomcat.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html
(c)
mod_jk2_________________________________________________________________
____
The very new JK2 communicates via ajp1.3/ajp1.4 using
CoyoteConnector+JkCoyoteHandler.
+ supports load balancing
+ supports in-process
+ works with Jetty
+ supports fast unix-sockets
+ fine grained configuration
+ easy to maintain mounts (no need to edit httpd.conf)
- jk2 is not as stable as mod_jk (correct me if I am wrong, I did not
try the latest versions)
- lack of documentation
- hard to build from cvs (IMO) - no binaries available AFAIK
mod_jk2 is configured by a configuration file named
workers2.properties. There you define hosts, ports, workers, uri
mapping etc:
### sample for workers2.properties monting cocoon as host.domain.tld/
###
[shm]
file=/usr/jakarta/catalina/work/jk2.shm
size=1048576
# Example socket channel, override port and host.
[channel.socket:host.domain.tld:8009]
port=8009
host=127.0.0.1
# define the worker
[ajp13:ministrant.leonid:8009]
channel=channel.socket: host.domain.tld:8009
# Uri mapping
[uri:ministrant.leonid/*]
worker=ajp13: host.domain.tld:8009
context=/cocoon
#### end of sample ###
docs: http://www.pubbitch.org/jboss/mod_jk2.html
http://www.mortbay.com/jetty/doc/modjk.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk2.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html
________________________________________________________________________
________
/Leo
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: [SUMMARY] Complicated setup
Posted by Jens Lorenz <je...@interface-projects.de>.
Jeremy Quinn wrote:
Hi,
> Hi Leo
>
> That was an excellent summary!
I can only agree and turned Leo's mail into a Wiki page by adding a
small amount of Wiki markup.
http://outerthought.net/wiki/Wiki.jsp?page=CocoonAndApache
Best regards,
Jens
--
Jens Lorenz
interface:projects GmbH \\|//
Tolkewitzer Strasse 49 (o o)
01277 Dresden ~~~~oOOo~(_)~oOOo~~~~
Germany
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: [SUMMARY] Complicated setup
Posted by leo leonid <te...@leonid.de>.
On Thursday, December 5, 2002, at 04:34 PM, Jeremy Quinn wrote:
> Hi Leo
>
> That was an excellent summary!
thanks :)
>
> The only thing I would add was that if you try to use mod_jk like this:
>
> JkMount /* worker
>
ok, and maybe the hint that every mount directive must start with a '/'
> it completely blocks the use of Apache for _any_ static content,
> making it very difficult (or at least, verbose) to use in certain
> circumstances.
>
> Does mod_jk2 suffer from the same limitation?
>
I don't use it at the moment, so I don't know all jk2 uri-mapping
possibilities and limitation in detail. I took a quick look on
http://marc.theaimsgroup.com/?l=tomcat-user&w=2&r=1&s=%5Buri%3A&q=b
where I found some kind of announcement of a 2.02 release that will
supports RE's.
This will make us all happy, especially Andrew Savory :)
> Many thanks for all your help
>
> regards Jeremy
>
> On Thursday, Dec 5, 2002, at 14:56 Europe/London, leo leonid wrote:
>
>> If you want to connect Cocoon with Apache httpd in order to serve
>> static/legacy content directly from Apache you have three
>> possibilities ATM (apart from the obsolete Jserv):
>
> <snip/>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: [SUMMARY] Complicated setup
Posted by Jeremy Quinn <je...@media.demon.co.uk>.
Hi Leo
That was an excellent summary!
The only thing I would add was that if you try to use mod_jk like this:
JkMount /* worker
it completely blocks the use of Apache for _any_ static content, making
it very difficult (or at least, verbose) to use in certain
circumstances.
Does mod_jk2 suffer from the same limitation?
Many thanks for all your help
regards Jeremy
On Thursday, Dec 5, 2002, at 14:56 Europe/London, leo leonid wrote:
> If you want to connect Cocoon with Apache httpd in order to serve
> static/legacy content directly from Apache you have three
> possibilities ATM (apart from the obsolete Jserv):
<snip/>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: [SUMMARY] Complicated setup
Posted by Mark Eggers <it...@yahoo.com>.
Folks, I added the following information to the Wikki
pages.
There are some binaries available, as well as source
packages for the various Tomcat connectors. The
connectors are now in their own project, called
jakarta-tomcat-connectors. Unfortunately there is no
home page within jakarta.apache.org that I can find,
and the online documentation does not point you to the
connector download area.
All of the connectors can be found under the following
general location:
http://jakarta.apache.org/builds/jakarta-tomcat-connectors
Explore under this directory for the latest binaries
and source packages for all of the connectors.
I hope this helps.
/mde/
just my two cents . . . .
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: [SUMMARY] Complicated setup
Posted by Geoff Howard <co...@yahoo.com>.
I really got the impression that mod_webapp and warp
are on the way out, which was an important factor for
me even though I wasn't deploying on windows. You may
consider mentioning at least the rumor?
Geoff
--- leo leonid <te...@leonid.de> wrote:
<snip/>
> mod_webapp communicates via the new WARP protocol,
> using Tomcats
> WarpConnector. You can easily mount whole
> webapps/contexts.
>
> + easy setup
>
> - not as stable as JK1.2
> - poor differentiation concerning mounts
> - no load balancing
> - not suitable for Windows
> - not suitable for Jetty
>
> Sample: mounting cocoon as
> http://host.domain.tld/cocoon/
>
> WebAppConnection warpConnection warp localhost:8008
> WebAppDeploy cocoon warpConnection /cocoon/
>
> Sample: mounting cocoon as http://host.domain.tld/
>
> WebAppConnection warpConnection warp localhost:8008
> WebAppDeploy cocoon warpConnection /
>
> # Problem: now EVERYTHING is served by cocoon. No
> way to serve
> static/legacy content by Apache!
>
> docs:
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/
>
> connectors.html
>
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/webapp.html
>
>
> (B)
>
mod_jk__________________________________________________________________
>
> ____
>
> mod_jk communicates via ajp1.3 protocol using an
> Ajp13Connector
>
> + very stable
> + supports load balancing
> + works with Jetty
>
> - long winded setup
> - poor syntax in mount directives
> - Maintenance of mounts needs changes to httpd.conf
>
>
>
> mod_jk is configured by a configuration file named
> workers.properties:
>
> ### sample for workers.properties ###
>
> workers.apache_log=/usr/local/apache2/logs/
> workers.tomcat_home=/usr/jakarta/catalina
> workers.java_home=/usr/java/current
> ps=/
> # Define 3 workers, 2 real ajp13 and one being a
> loadbalancing worker
> worker.list=worker1 worker2
> # Set properties for worker1 (ajp13)
> worker.worker1.type=ajp13
> worker.worker1.host=host1.domain.tld
> worker.worker1.port=8009
> worker.worker1.lbfactor=50
> worker.worker1.cachesize=10
> worker.worker1.cache_timeout=600
> worker.worker1.socket_keepalive=1
> worker.worker1.socket_timeout=300
> # Set properties for worker2 (ajp13)
> worker.worker2.type=ajp13
> worker.worker2.host=host2.domain.tld
> worker.worker2.port=8009
> worker.worker2.lbfactor=50
> worker.worker2.cachesize=10
> worker.worker2.cache_timeout=600
> worker.worker2.socket_keepalive=1
> worker.worker2.socket_timeout=300
> # Set properties for worker3 (lb) which use worker1
> and worker2
> worker.worker3.balanced_workers=worker1,worker2
>
> #### end of sample ###
>
> in you httpd.conf you put your mount directives like
>
> # mounting only the index
> JkMount / worker2
> # further, for example for mounting all html files
> JkMount /*.html worker2
> # further, for example for mounting everything in
> dir
> JkMount /dir/* worker2
>
> Things that unfortunately *DON�T* work!
>
> JkMount */dir/ worker2
> JkMount **/dir/ worker2
> JkMount /dir1/**/dir/ worker2
> JkMount /dir1/*/dir/*/*.html worker2
> JkMount /!(images|movies|audio)* worker2
>
> docs:
>
http://www.onjava.com/pub/a/onjava/2002/11/20/tomcat.html
>
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html
>
>
> (c)
>
mod_jk2_________________________________________________________________
>
> ____
>
> The very new JK2 communicates via ajp1.3/ajp1.4
> using
> CoyoteConnector+JkCoyoteHandler.
>
> + supports load balancing
> + supports in-process
> + works with Jetty
> + supports fast unix-sockets
> + fine grained configuration
> + easy to maintain mounts (no need to edit
> httpd.conf)
>
> - jk2 is not as stable as mod_jk (correct me if I
> am wrong, I did not
> try the latest versions)
> - lack of documentation
> - hard to build from cvs (IMO) - no binaries
> available AFAIK
>
> mod_jk2 is configured by a configuration file named
>
> workers2.properties. There you define hosts, ports,
> workers, uri
> mapping etc:
>
> ### sample for workers2.properties monting cocoon
> as host.domain.tld/
> ###
>
> [shm]
> file=/usr/jakarta/catalina/work/jk2.shm
> size=1048576
>
> # Example socket channel, override port and host.
> [channel.socket:host.domain.tld:8009]
> port=8009
> host=127.0.0.1
>
> # define the worker
> [ajp13:ministrant.leonid:8009]
> channel=channel.socket: host.domain.tld:8009
>
> # Uri mapping
> [uri:ministrant.leonid/*]
> worker=ajp13: host.domain.tld:8009
> context=/cocoon
>
> #### end of sample ###
>
> docs: http://www.pubbitch.org/jboss/mod_jk2.html
> http://www.mortbay.com/jetty/doc/modjk.html
>
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk2.html
>
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html
>
>
________________________________________________________________________
>
> ________
>
> /Leo
>
>
>
>
---------------------------------------------------------------------
> Please check that your question has not already
> been answered in the
> FAQ before posting.
> <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:
> <co...@xml.apache.org>
> For additional commands, e-mail:
> <co...@xml.apache.org>
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>