Jeremy Boynes wrote:
[...]
It looks like the least intrusive route that I could provide documentation for would be to get Geronimo working with Apache using mod_jk.


That should work - you should just need to change the listener to use AJP and then configure HTTPD as usual.

By listener do you mean the JettyWebConnector gbean defined in j2ee-server-plan.xml?  Do I simply replace the HTTPConnector class specified in the gbean descriptor with AJP13Connector?

As far as configuring httpd goes it appears that I am going to need to add support in httpd.conf for a workers.properties file for Apache 1.3 and a workers2.properties file for Apache 2. Here's what I found for httpd.conf/1.3...
LoadModule    jk_module  libexec/mod_jk.so
AddModule     mod_jk.c
JkWorkersFile /usr/local/jakarta-tomcat/conf/workers.properties
JkLogFile     /usr/local/apache/logs/mod_jk.log
JkLogLevel    info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]
  
I also will need to configure in httpd.conf some JkMount entries in a VirtualHost to use ajp13.

For a workers.properties file that might work with Geronimo/Jetty I found...
workers.tomcat_home=/usr/local/jakarta-tomcat
workers.java_home=/usr/java
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
  
I am assuming workers.tomcat_home gets ignored when running against Geronimo/Jetty. My hope is that I could simply reuse these configurations for Geronimo/Tomcat. I ignored the stuff I saw about supporting an inprocess JNI connector.

For Apache2 I found the following for httpd.conf...
LoadModule    jk_module  modules/mod_jk.so
AddModule     mod_jk.c
JkWorkersFile /usr/local/jakarta-tomcat/conf/workers2.properties
JkLogFile     /usr/local/apache/logs/mod_jk.log
JkLogLevel    info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]
  
...and there is this on the Jetty web site...
    ---- workers2.properties
    
    # Example socket channel, override port and host.
    [channel.socket:localhost:8009]
    port=8009
    host=127.0.0.1
    
    # define the worker
    [ajp13:localhost:8009]
    channel=channel.socket:localhost:8009
    
    # Uri mapping. This says that any incoming connection to any file
    # under "/jetty/" should be handled the worker defined above
    
    [uri:/jetty/*]
    worker=ajp13:localhost:8009
    
    # The same, but for /demo
    [uri:/demo/*]
    worker=ajp13:localhost:8009
    
    ---- end worker2.properties
      
This seems straight forward. It looks like Apache2/workers2 is enhanced with support for routing url patterns to different hosts.

I am going to take a break and then start testing the above on a Mac OS X powerbook (Apache 1.3) and a Fedora Core 3 box (Apache 2). I'll report back with any successes and/or failures.

Scott

Reply via email to