FYI...you aren't using JK2 at all.  You are using JK.

John

-----Original Message-----
From: Soefara Redzuan [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 18, 2003 4:04 AM
To: [EMAIL PROTECTED]
Subject: Solved it. Re: mod_jk virtual hosts ? 90% of the way there.


Solved it myself :-)

I added the JkMount to the <VirtualHost > directives and now everything 
appears to work perfectly.

<VirtualHost aaa.bbb.ccc.ddd>
    ServerName www.domain1.com
    ErrorLog logs/error_log
    TransferLog logs/access_log
    JkMount /* worker1
</VirtualHost>

<VirtualHost aaa.bbb.ccc.ddd>
    ServerName www.domain2.com
    ErrorLog logs/error_log
    TransferLog logs/access_log
    JkMount /* worker1
</VirtualHost>

Wow, this mod_jk2 really is much easier to configure than mod_jk was, though

the advanced configuration looks quite daunting. For simple virtual hosting 
of a servlet/JSP site, I shouldn't need more than one worker, should I?

Thank you.

Soefara.





>From: "Soefara Redzuan" <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: mod_jk virtual hosts ? 90% of the way there.
>Date: Tue, 18 Feb 2003 16:05:04 +0800
>
>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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---

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

Reply via email to