tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sunisson <sunis...@netscape.net>
Subject Re: mod_jk virtual hosts ? 90% of the way there.
Date Tue, 18 Feb 2003 19:59:35 GMT
Could you please tell me which linux you use and what version?

I tried to do the same on my redhat 8.0. So it is apache2 and tomecat 
4.1. I even cannot compile the native(ant native).

Any suggestion?

soefararedzuan@hotmail.com wrote:

> 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
>

-- 
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop@Netscape! 
http://shopnow.netscape.com/



---------------------------------------------------------------------
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