This setup has been tested on Apache2+JBoss+mod_jk-1.2.14_for MacOSX. And
am sure it will work on other platforms as well. This setup also handles
Apache related webapps..
Make the required entries in the DNS
webapp.war: Extract the war file using zip and rename the folder
with .war extension. Please put it in your deployment folder.
mod-jk.so: Obtain the modjk.so library file from www.apache.org and place
then in the modules folder.
Apache-Virtual Host config
----------------------
NameVirtualHost *.*.*.*:80
<VirtualHost *.*.*.*:80>
ServerName webapp.domainname.com
ServerAlias www.webapp.domainname.com
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /Volumes/Extra/jboss/server/default/deploy/webapp.war
JkMount /* loadbalancer
DirectoryIndex index.html index.jsp
ErrorLog logs/webapp-error_log
CustomLog logs/webapp-access_log common
</VirtualHost>
-------------------------------------------------------------------------
mod-jk.conf
================
LoadModule jk_module /opt/apache2/modules/mod_jk.so
JkWorkersFile /opt/apache2/conf/workers.properties
JkLogFile /opt/apache2/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /webapp.domain.com/*.jsp loadbalancer
JkMountFile /opt/apache2/conf/uriworkermap.properties
JkShmFile /opt/apache2/logs/jk.shm
<Location /jkstatus/>
JkMount status
Allow from 127.0.0.1
Deny from All
</Location>
--------------------------------------------------------------------------
Server.xml
---------
<Host name="webapp.domain.com" debug="0" appBase="deploy"
unpackWARs="true">
<Alias>www.webapp.domain.com</Alias>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="webapp_log1." suffix=".log"
timestamp="true"/>
<Context path=""
docBase="${jboss.server.home.dir}/deploy/webapp.war" debug="0"
reloadable="true"/>
</Host>
--------------------------------------------------------------------------
--
uriworkermap.properties
================
/jmx-console=loadbalancer
/jmx-console/*=loadbalancer
/web-console=loadbalancer
/web-console/*=loadbalancer
/webapp.domain.com/*.jsp
--------------------------------------------------------------------------
--
workers.properties
================
worker.list=loadbalancer,status
worker.webapp.port=8009
worker.webapp.host=webapp.domain.com
worker.webapp.type=ajp13
worker.webapp.lbfactor=1
worker.webapp.cachesize=10
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=library
worker.loadbalancer.sticky_session=1
worker.loadbalancer.local_worker_only=1
worker.list=loadbalancer
worker.status.type=status
_____________________
Regards & Thanks
================
Mahesh S Kudva
-----Original Message-----
From: Steve Dodge <[EMAIL PROTECTED]>
To: Tomcat Users List <[email protected]>
Date: Thu, 15 Sep 2005 15:57:04 -0500
Subject: Re: Virtual Hosts
> You probably want to change the appBase. You can control the contexts
> by
> creating a context snippet in conf/[Engine name]/[Host name] or add it
> to META-INF/context.xml in each war.
>
> Hope that helps,
> Steve
>
> Durfee, Bernard wrote:
>
> >Okay, so I created two <host> elements in my server.xml...
> >
> > <Host name="app01.myserver.com"
> > appBase="webapps"
> > autoDeploy="true"
> > deployOnStartup="true"
> > deployXML="true"
> > unpackWARs="true"
> > xmlValidation="false"
> > xmlNamespaceAware="false" />
> >
> > <Host name="app02.myserver.com"
> > appBase="webapps"
> > autoDeploy="true"
> > deployOnStartup="true"
> > deployXML="true"
> > unpackWARs="true"
> > xmlValidation="false"
> > xmlNamespaceAware="false" />
> >
> >...but how do I tell Tomcat which context to process? There will be no
> >context correct? Do I need a separate appBase directory for each
> <host>
> >element?
> >
> >Thanks,
> >Bernie
> >
> >
> >
> >
> >
> >>-----Original Message-----
> >>From: Allistair Crossley [mailto:[EMAIL PROTECTED]
> >>Sent: Thursday, September 15, 2005 12:10 PM
> >>To: Tomcat Users List
> >>Subject: RE: Virtual Hosts
> >>
> >>
> >>Simplistically ...
> >>
> >>Configure Host elements inside your Engine. Create a folder
> >>for each application within webapps. Set the Host docBase to each.
> >>
> >>Check out the online ref.
> >>
> >>
> >>
> >>>-----Original Message-----
> >>>From: Durfee, Bernard [mailto:[EMAIL PROTECTED]
> >>>Sent: 15 September 2005 17:07
> >>>To: [email protected]
> >>>Subject: Virtual Hosts
> >>>
> >>>
> >>>I am having trouble configuring virtual hosts in Tomcat
> >>>
> >>>
> >>5.5.9. I have
> >>
> >>
> >>>two applications app01 and app02. I have 2 DNS entries
> >>>app01.myserver.com and app02.myserver.com that both point to the
> >>>machine on which Tomcat is running. How do I configure
> >>>
> >>>
> >>Tomcat to serve
> >>
> >>
> >>>from app01.war when app01.myserver.com is hit and app02.war when
> >>>app02.myserver.com is hit.
> >>>
> >>>Thanks,
> >>>Bernie
> >>>
> >>>
> >>>
> >>>
> >>>
> >>---------------------------------------------------------------------
> >>
> >>
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >>>
> >><FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
> >>-------------------------------------------------------
> >>QAS Ltd.
> >>Registered in England: No 2582055
> >>Registered in Australia: No 082 851 474
> >>-------------------------------------------------------
> >></FONT> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLACK>
> >>Disclaimer: The information contained within this e-mail is
> >>confidential and may be privileged. This email is intended
> >>solely for the named recipient only; if you are not
> >>authorised you must not disclose, copy, distribute, or retain
> >>this message or any part of it. If you have received this
> >>message in error please contact the sender at once so that we
> >>may take the appropriate action and avoid troubling you
> >>further. Any views expressed in this message are those of
> >>the individual sender. QAS Limited has the right lawfully to
> >>record, monitor and inspect messages between its employees
> >>and any third party. Your messages shall be subject to such
> >>lawful supervision as QAS Limited deems to be necessary in
> >>order to protect its information, its interests and its reputation.
> >>
> >>Whilst all efforts are made to safeguard Inbound and Outbound
> >>emails, QAS Limited cannot guarantee that attachments are
> >>virus free or compatible with your systems and does not
> >>accept any liability in respect of viruses or computer
> >>problems experienced. </FONT>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-------------------------------------------------------
Robosoft Technologies - Partners in Product Development
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]