There is hope! I have been able to run up :
multiple apache instances on one tier, talking to multiple tomcat instances on another tier, with a load balancer sitting in front of the websevers. using solaris 8, apache 2.0.43, tomcat 4.1.18 After you define your channels and workers, eg # Define channels [channel.socket:channel1] port=2111 host=apphost1 tomcatId=tc1 [channel.socket:channel2] port=2112 host=apphost2 tomcatId=tc2 # Define workers [ajp13:worker1] channel=channel.socket:channel1 [ajp13:worker2] channel=channel.socket:channel2 you can then define a loadbalancer worker : [lb:LBworker] attempts=1 recovery=30 timeout=0 worker=ajp13:worker1 worker=ajp13:worker2 after that, configure your URI directives to send dynamic traffic to the LBworker : # Uri mapping [uri:/*.jsp] worker=lb:LBworker [uri:/*.do] worker=lb:LBworker Of course if you have any firewalls between your webserver and your app servers, they will need to be configured to let traffic through.. in this example, tcp/ip on ports 2111 , 2112. Good luck! Kwong. -----Original Message----- From: Mark Eggers [mailto:[EMAIL PROTECTED] Sent: Friday, 14 March 2003 6:56 To: Tomcat Users List Subject: Re: three tiers on three machines: Apache, Tomcat, DB Terence, I've never done this, and I don't have three machines to test this on. However, this is how I would approach things: # # workers2.properties # replace <hostname> with your host name for Tomcat # replace <ip_address> with your host ip address for # Tomcat # [channel.socket:<hostname>:8009] port = 8009 host = <ip_address> # define the worker [ajp13:<hostname>:8009] channel=channel.socket:<hostname>:8009 # map a URI [uri:/examples/*.jsp] worker=ajp13:<hostname>:8009 # # jk2.properties # # Socket configuration # handler.list=request,container,channelSocket # # socket configuration # channelSocket.port=8009 channelSocket.address=<ip_address> channelSocket.maxPort=port+10 <!-- JNDI stuff see the following in the documentation and replace localhost with the name or ip address of your database server. This should get remote database connections up and running http://localhost:8080/tomcat-docs/jndi-datasource-examples-howto.html --> There are a few issues that I'm not sure about. One is how to get the URIs correct when a request is forwarded from your Apache host to the Tomcat host. Does this happen automatically, or do you need to do some URI rewriting? Also, lacing static and dynamic pages together might get interesting. I would imagine that you would need to create the same site structure on both machines so that html, images, css files, jsp files, and servlets can 'find' each other. Just some thoughts - hope this gets you started. /mde/ just my two cents . . . . __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---------------- Powered by telstra.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
