You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mikolaj Rydzewski <mi...@becomo.com> on 2005/08/25 13:55:56 UTC

Manager webapp and virtual hosts

Hello,

My configuration is very simple: tomcat listens on localhost with 
various apps in their contexts. Now I'd like to setup a virtual host for 
another one. Will it be possible to deploy/reload such application using 
manager webapp running on localhost? In other words: do I have to 
install separate manager webapp for each virtual host?

And the second question is: is it possible to connect apache with 
virtual host + mod_jk + tomcat with webapp in it's context? I.e.:

my1.domain.com (apache + mod_jk) ===>   tomcat.domain.com/webapp1
my2.domain.com (apache + mod_jk) ===> tomcat.domain.com/webapp2

?

-- 
Mikolaj Rydzewski  <mi...@becomo.com>
Becomo S.A.
tel. (12) 2927104



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


Re: Manager webapp and virtual hosts

Posted by Dan Baggott <ba...@llnl.gov>.
Mikolaj,

Hi.  Sorry to bother you but I saw this posting on the Tomcat list and
was wondering if you were able to successfully set up what you
describe?

I have mod_jk working fine and I'm now trying to do exactly what you mentioned:

my1.domain.com (apache + mod_jk) ===>   tomcat.domain.com/webapp1
my2.domain.com (apache + mod_jk) ===> tomcat.domain.com/webapp2

So far I haven't had much success.  If you've gained any insights that
you can share with me, I'd be very grateful.

Cheers,

Dan

On 8/25/05, Mikolaj Rydzewski <mi...@becomo.com> wrote:
> Hello,
>
> My configuration is very simple: tomcat listens on localhost with
> various apps in their contexts. Now I'd like to setup a virtual host for
> another one. Will it be possible to deploy/reload such application using
> manager webapp running on localhost? In other words: do I have to
> install separate manager webapp for each virtual host?
>
> And the second question is: is it possible to connect apache with
> virtual host + mod_jk + tomcat with webapp in it's context? I.e.:
>
> my1.domain.com (apache + mod_jk) ===>   tomcat.domain.com/webapp1
> my2.domain.com (apache + mod_jk) ===> tomcat.domain.com/webapp2
>
> ?
>
> --
> Mikolaj Rydzewski  <mi...@becomo.com>
> Becomo S.A.
> tel. (12) 2927104
>
>
>
> ---------------------------------------------------------------------
> 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


Re: Manager webapp and virtual hosts

Posted by Mahesh S Kudva <ma...@robosoftin.com>.
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.robosoft.co.in
    ServerAlias www.webapp.robosoft.co.in
    ServerAdmin root@localhost
    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 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: David Delbecq <de...@oma.be>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Date: Thu, 25 Aug 2005 14:01:46 +0200
Subject: Re: Manager webapp and virtual hosts

> Le Jeudi 25 Août 2005 13:55, Mikolaj Rydzewski a écrit :
> > Hello,
> > 
> > My configuration is very simple: tomcat listens on localhost with 
> > various apps in their contexts. Now I'd like to setup a virtual host
> for 
> > another one. Will it be possible to deploy/reload such application
> using 
> > manager webapp running on localhost? In other words: do I have to 
> > install separate manager webapp for each virtual host?
> 
> For 1st part, did it here (2 sets of webapp depending on hostname
> used), must have 
> the manager webapp deployed in each host (actually a soft link on
> unix having webapps-for-somespecial-hostname/manager points to
> webapps/manager is enough)
> 
> > 
> > And the second question is: is it possible to connect apache with 
> > virtual host + mod_jk + tomcat with webapp in it's context? I.e.:
> > 
> > my1.domain.com (apache + mod_jk) ===>   tomcat.domain.com/webapp1
> > my2.domain.com (apache + mod_jk) ===> tomcat.domain.com/webapp2
> > 
> > ?
> > 
> 
> -- 
> David Delbecq
> Royal Meteorological Institute of Belgium
> 
> -
> Is there life after /sbin/halt -p?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



-------------------------------------------------------
Robosoft Technologies - Partners in Product Development



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


RE: Manager webapp and virtual hosts

Posted by GB Developer <gb...@globallyboundless.com>.
another option is to use this:
http://www.talika.org/tms/

I'm using it on three tomcat 5.0.29 servers, each with a dozen or so vhosts,
and it works great. 



> -----Original Message-----
> From: David Delbecq [mailto:delbd@oma.be] 
> Sent: Thursday, August 25, 2005 7:02 AM
> To: Tomcat Users List
> Subject: Re: Manager webapp and virtual hosts
> 
> 
> Le Jeudi 25 Août 2005 13:55, Mikolaj Rydzewski a écrit :
> > Hello,
> > 
> > My configuration is very simple: tomcat listens on localhost with
> > various apps in their contexts. Now I'd like to setup a 
> virtual host for 
> > another one. Will it be possible to deploy/reload such 
> application using 
> > manager webapp running on localhost? In other words: do I have to 
> > install separate manager webapp for each virtual host?
> 
> For 1st part, did it here (2 sets of webapp depending on 
> hostname used), must have 
> the manager webapp deployed in each host (actually a soft 
> link on unix having webapps-for-somespecial-hostname/manager 
> points to webapps/manager is enough)


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


Re: Manager webapp and virtual hosts

Posted by David Delbecq <de...@oma.be>.
Le Jeudi 25 Août 2005 13:55, Mikolaj Rydzewski a écrit :
> Hello,
> 
> My configuration is very simple: tomcat listens on localhost with 
> various apps in their contexts. Now I'd like to setup a virtual host for 
> another one. Will it be possible to deploy/reload such application using 
> manager webapp running on localhost? In other words: do I have to 
> install separate manager webapp for each virtual host?

For 1st part, did it here (2 sets of webapp depending on hostname used), must have 
the manager webapp deployed in each host (actually a soft link on
unix having webapps-for-somespecial-hostname/manager points to
webapps/manager is enough)

> 
> And the second question is: is it possible to connect apache with 
> virtual host + mod_jk + tomcat with webapp in it's context? I.e.:
> 
> my1.domain.com (apache + mod_jk) ===>   tomcat.domain.com/webapp1
> my2.domain.com (apache + mod_jk) ===> tomcat.domain.com/webapp2
> 
> ?
> 

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?

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