tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Turner, John" <JTur...@AAS.com>
Subject RE: mod_jk virtual hosts ? 90% of the way there.
Date Tue, 18 Feb 2003 13:52:48 GMT

Mod_jk/Apache uses workers.properties to understand how to find Tomcat.
Tomcat just does the reverse.  Since it is Apache/JK that initiates the
connection to Tomcat, this is sufficient.  Tomcat never initiates a request
over the mod_jk without a previous request from Apache.

John


> -----Original Message-----
> From: Soefara Redzuan [mailto:soefararedzuan@hotmail.com]
> Sent: Tuesday, February 18, 2003 7:35 AM
> To: tomcat-user@jakarta.apache.org
> Subject: RE: mod_jk virtual hosts ? 90% of the way there.
> 
> 
> Thank you John,
> 
> You're right on all three counts
> (a) I forgot a JkMount line and now it works fine
> (b) I was a clumsy clown and actually using mod_jk, not mod_jk2
> (c) Jk does indedd have far more documentation than mod_jk2
> 
> Therefore I am going to stick with the mod_jk, especially 
> since I have got 
> it running.
> 
> There just remains one thing that I do not understand -
> 
> I'm using Tomcat4.1.18 (just installed today) and if my 
> "<tomcathome>/conf/jk2.properties" file is not being read at 
> all then how 
> does Tomcat know how to communicate with Apache ? Or is 
> Apache the only 
> piece of this puzzle which needs configuring (with mod_jk) 
> since it is the 
> one making the connections?
> 
> Thank you and sorry for all the confusion earlier.
> 
> Soefara.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> >From: "Turner, John" <JTurner@AAS.com>
> >Reply-To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> >To: 'Tomcat Users List' <tomcat-user@jakarta.apache.org>
> >Subject: RE: mod_jk virtual hosts ? 90% of the way there.
> >Date: Tue, 18 Feb 2003 06:46:54 -0500
> >
> >
> >JK has way more documentation and support than JK2.
> >
> >You're missing a JkMount line.
> >
> ><VirtualHost aaa.bbb.ccc.ddd>
> >ServerName www.domain1.com
> >DocumentRoot /usr/local/etc/httpd/site1
> >ErrorLog logs/error_log
> >TransferLog logs/access_log
> >
> >JkMount /*.jsp ajp13
> >JkMount /servlets/* ajp13
> ></VirtualHost>
> >
> >John
> >
> >
> >-----Original Message-----
> >From: Soefara Redzuan [mailto:soefararedzuan@hotmail.com]
> >Sent: Tuesday, February 18, 2003 3:05 AM
> >To: tomcat-user@jakarta.apache.org
> >Subject: mod_jk virtual hosts ? 90% of the way there.
> >
> >
> >Hello all,
> >
> >Mod_jk2 is much easier to install and configure than mod_jk ever was,
> >largely due to some much more abundant and well-written 
> documentation.
> >
> >I've set up mod_jk2 and now Apache is passing requests to 
> Tomca OK. I've
> >also set up Virtual Hosts in Tomcat's server.xml, and now I 
> can access
> >my server via "http://www.mydomain.com:8080" instead of the 
> IP address.
> >
> >Now I'd like to put the two together and have Apache handle
> >http://www.mydomain.com and pass the requests through to 
> Tomcat4, and now
> >I'm confused where I go from here. I'm comfortable with Apache's
> ><VirtualHost> directive in httpd.conf but can't see how it 
> works with 
> >mod_jk
> >
> >since there's only one set of mod_jk directives per httpd.conf
> >
> >This is what I have so far,
> >
> >Tomcat_Home/conf/jk2.properties:
> >--------------------------------
> ># Define the communication channel [channel.socket:localhost:8009]
> >info=Ajp13 forwarding over socket tomcatId=localhost:8009
> >
> ># Map the Tomcat examples webapp to the Web server uri space
> >[uri:/examples/*] info=Map the whole webapp
> >
> >
> >
> >Apache's httpd.conf
> >-------------------
> >LoadModule jk_module modules/mod_jk.so
> ><IfModule mod_jk.c>
> >AddModule mod_jk.c
> >JkWorkersFile /usr/local/etc/httpd/conf/workers.properties
> >JkLogFile /usr/local/etc/httpd/logs/mod_jk.log
> >JkLogLevel info
> >JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> >JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> >JkRequestLogFormat "%w %V %T" JkMount /examples/* worker1 </IfModule>
> >
> >
> >
> >workers.properties (in same directory as httpd.conf)
> >----------------------------------------------------
> ># Define 1 real worker using ajp13
> >worker.list=worker1
> >
> ># Set properties for worker1 (ajp13)
> >worker.worker1.type=ajp13
> >worker.worker1.host=localhost
> >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=3
> >
> >
> >The above passes requests from Apache to Tomcat OK.
> >Now for virtual hosts,
> >
> ><Host name="www.domain1.com" appBase="webapps">
> >     <Alias>domain1.com</Alias>
> >     <Context path="" docBase="ROOT"></Context>
> ></Host>
> >
> ><Host name="www.domain2.com" appBase="webapps">
> >     <Alias>mydomain2.com</Alias>
> >     <Context path="" docBase="mainsite"></Context>
> ></Host>
> >
> >
> >But what do I add to Apache's httpd.conf for the virtual hosts ?
> >
> ><VirtualHost aaa.bbb.ccc.ddd>
> >ServerName www.domain1.com
> >DocumentRoot /usr/local/etc/httpd/site1
> >ErrorLog logs/error_log
> >TransferLog logs/access_log
> ></VirtualHost>
> >
> >I feel I'm so close. Could somebody please help with this last part ?
> >
> >Thank you very much,
> >
> >Soefara.
> >
> >ps. is 1 worker enough to handle everything ?
> >
> >
> >_________________________________________________________________
> >MSN 8 with e-mail virus protection service: 2 months FREE*
> >http://join.msn.com/?page=features/virus
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >---
> >
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
> >
> >
> >---
> >
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online 
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message