Hi,

I've come to this thread a few days late but I thought I would mention
how I did it as no body else here seems to have done it this way.

In tomcat the Cocoon servlet is mounted at the root, i.e. no prefix.

I started out using mod_jk and used JkMount for ech of the top level
sections of our website. This looked like it worked and left apache
to handle all other URL's (images,css,big file downloads etc).

But when I came to implement i18n I found that the browsers acccept-language
request headers did not make it though to Cocoon :-(

I got around this by having tomcat (one of the 4.0 milestones at the time)
listen on an http port 127.0.0.1:8080 and using mod_proxy in apache.
In this way I could get all the headers passed to Cocoon and it all
works.

So, in httpd.conf I have:

# this handle some servlets and svg paths to Cocoon
<IfModule mod_jk.c>
JkWorkersFile /etc/tomcat/jk/workers.properties
JkLogLevel error
JkLogFile /var/log/apache/mod_jk.log
JkMount /svg/* ajp13
JkMount /servlet/* ajp13
JkMount /testpilot/*.tp3 ajp13
</IfModule>

# handle redirects sent from Cocoon
<IfModule mod_proxy.c>
ProxyPassReverse / http://127.0.0.1:8080/
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteLog /var/log/apache/rewrite.log
RewriteLogLevel 1
# I snipped out some legacy url re-writing here...

# This handles the home page
RewriteRule ^/$ http://127.0.0.1:8080/ [P]

# This handles each top level section
RewriteRule /(search|auth|login|school|people|gazette|teaching|research|admin)/(.*) http://127.0.0.1:8080/$1/$2 [P]
# Note: mozilla did the wrapping here!
</ifModule>

That's about it.

Maybe some time I should try the latest tomcat and mod_jk to see if
the problem with the language headers still exists. Currently I'm using
Cocoon 2.0.4-dev and tomcat 4.0.5.

Sim


On 12/03/02 14:34, Jeremy Quinn wrote:
Hi All

Can anyone advise me on getting this complicated setup right?

We have a website that will have some stuff served by Cocoon and some served by Apache.

It is not easy to separate them out because we need to retain legacy URLs. Likewise, it is not possible to give Cocoon served material a URL prefix, primarily because we need Cocoon to serve the home page of the site.

From Cocoon:

/
/index
/general/*
/archive/*
/x-space/*
etc. (about 10 items)

From Apache:

/images/*
/movies/*
/audio/*
/x-spaceprojects/*
/harlem/*
etc. (also about 10 items)


And then we need Slide-based WebDAV access to the Cocoon based material, with Cocoon generating from the Slide repository ..... and this I have still never had working .....

If necessary we /could/:
a) place all static content in a single directory and redirect (legacy URLs) into it from Cocoon.
b) use virtual-hosts, one for Cocoon and one for the static stuff and redirect from Cocoon. But redirecting to images etc. is not that great ;)

I am getting confused with all the options ...... virtual-hosts, web-app, JK, JK2 connectors and all the options in them!

Have any of you lot tried any of this before?
How did you approach it?

Many thanks for any help


regards Jeremy








---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
--
Simeon Walker,                      email: [EMAIL PROTECTED]
School of Biological Sciences,      phone: +44 (0)1248 383702
University of Wales, Bangor,        fax: +44 (0)1248 382569
Gwynedd, LL57 2UW, UK.              www: http://biology.bangor.ac.uk/



---------------------------------------------------------------------
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to