Jeremy Quinn writes:

> 
> On Tuesday, Dec 3, 2002, at 17:57 Europe/London, leo leonid wrote:
> 
> >
> > On Tuesday, December 3, 2002, at 05:52 PM, Jeremy Quinn wrote:
> >
> >>
> >> On Tuesday, Dec 3, 2002, at 15:31 Europe/London, leo leonid wrote:
> >>
> >>>
> >>> On Tuesday, December 3, 2002, at 03:34 PM, Jeremy Quinn wrote:
> >>>
> >>>> Hi All
> >>>>
> >>>> Can anyone advise me on getting this complicated setup right?
> >>
> >> <snip/>
> >>
> >>>>
> >>>> Many thanks for any help
> >>>
> >>>
> >>> I had a very similar situation, I solved it by regarding the suffix. 
> >>> In my Apache DocumentRoot are all directories with static content. I 
> >>> only mount the following
> >>>
> >>> JkMount /  worker2
> >>> JkMount /*.html  worker2
> >>> JkMount /*.xml  worker2
> >>>
> >>
> >> Is 'JK2' the best one to be using now?
> >> I am a bit confused between mod_webapp (warp) and JK[n] TBH.
> >>
> >
> > I actually use JK1.2 ajp13 connector (works fine with Jetty, too)
> >
> 
> OK, that's good the hear.
> I am testing on MacOSX, and that's the only version available ATM.
> 
> > I formerly used mod_webapp, which is simple to setup, but less 
> > flexible in managing the urispace. Apart from this it does not support 
> > load-balancing and has it has turned out to be not as stable as my 
> > current solution.
> >
> 
> OK, I have used mod_webapp before for simpler stuff, and it has been 
> stable.
> 
> > I experimented with jk2, too. Big advantage with jk2 is that you don't 
> > have to change the httpd.conf with every change in your mounts (you 
> > keep them in a separate file workers2.properties).
> 
> Do you mean this is where you differentiate between different Servlets? 
> Or do you do more than that in this file? I've never used one before, 
> except probably the default.

There you define hosts, ports, workers, uri mapping etc ... a sample

[shm]
file=/usr/jakarta/catalina/work/jk2.shm
size=1048576

# Example socket channel, override port and host.
[channel.socket:ministrant.leonid:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:ministrant.leonid:8009]
channel=channel.socket:ministrant.leonid:8009

# Uri mapping
[uri:ministrant.leonid/*]
worker=ajp13:ministrant.leonid:8009
context=/cocoon




> 
> > But I had some very strange results with jk2, resources like images 
> > and css has been served in a random-like order after some hours with 
> > heavy load and my boring pages looked like artwork :-) maybe a cashing 
> > problem, never found the reason, so I switched back to jk1.2. (at that 
> > time jk2 was still alpha, maybe it is fine now, but AFAIK there is 
> > currently no solution with jk2 and Jetty)
> 
> You are using Jetty rather than TomCat?
> 
Yes, a big advantage while developing is that it starts and stops x-times
faster. And it is very stable for production use.
> >
> >
> >>> Sure you'll run into troubles if there are html files in the static 
> >>> directories, or you rename it to *.htm
> >>
> >> Can't change the urls ;)
> >>
> >>>
> >>> I you find a more flexible solution, please tell me.
> >>
> >> The problem here, is relying on suffixes ..... we cannot .....
> >>
> >>
> >> As I remember, mapping '/' to mod_webapp stopped Apache from serving 
> >> ANYTHING.
> >>
> >
> > WebAppConnection warpConnection warp ministrant.leonid:8008
> > WebAppDeploy cocoon warpConnection /
> >
> > this works, but now EVERYTHING is handled by cocoon. (That's maybe 
> > what you mean)
> >
> 
> exactly
> 
> >
> >> But as you imply in your sample above, this is not the case with JK2?
> >>
> >> So I would be able to map a long list of folders to JK2 and have 
> >> everything else automatically handled by Apache?
> >>
> >> eg.
> >>
> >> JkMount / worker2
> >> JkMount /index worker2
> >> JkMount /index.* worker2
> >> JkMount /archive/* worker2
> >> JkMount /collaboration/* worker2
> >> JkMount /education/* worker2
> >> JkMount /general/* worker2
> >> JkMount /library/* worker2
> >> JkMount /news/* worker2
> >> JkMount /press/* worker2
> >> JkMount /publications/* worker2
> >> JkMount /season/* worker2
> >> JkMount /search/* worker2
> >> JkMount /x-space/* worker2
> >>
> >> Is this going to work?
> >>
> >
> > Yes, this will work - with the drawback, that you probably have to 
> > update httpd.conf very often.
> 
> yeah, not much fun ....
> 
> >  It would be famous if the guys from jk would adopt the cocoon sitemap 
> > language. But at present the matching possibilities are very limited. 
> > */dir/ or **/dir/* does not work :(
> >
> 
> Oh would'nt it!
> 
> Reading the docs, for JK, (not sure if I understood them correctly), 
> but configuring:
> 
>       JkOptions +ForwardDirectories
> 
> in conjunction with DirectoryIndex ??
> 
> quote:
> 
> "If ForwardDirectories is set to true and Apache doesn't find any files 
> that match, the request will be forwarded to Tomcat for resolution. 
> This is used in cases when Apache cannot see the index files on the 
> file system for various reasons: Tomcat is running on a different 
> machine, the JSP file has been precompiled etc. "
> 
> I do not know if this is relevant to my situation, whereby if an 
> incoming URL does not match a file, the request is automatically sent 
> to TomCat?
> 
> A setup like that would make it really easy!
> 
> What's more the client could decide at any time to statically render 
> parts of the Cocoon site (that were not changing regularly) and have 
> them served by Apache.
> 
> Do you have any experience of these directives?
> 
No, I don't use this. Maybe I would have tried it if I had found this nice
piece of docu at that time. On the other Hand, I don't want Cocoon to
handle every bad request.

/Leo
> >
> >
> >> Will Cocoon 'receive' the whole URL, or just the bit picked up by the 
> >> '*'?
> >>
> >
> > yes, the whole URL
> 
> good to hear!
> 
> Thanks, this has been very helpful.
> 
> 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]>

Reply via email to