tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amir Mistric" <>
Subject mod_jk and vhosts and webapps deployed under "/" context
Date Thu, 15 Jun 2006 17:24:36 GMT


I was wondering if someone can tell me how to mount webapp via mod_jk when
webapp is deployed under "/" context using vhosts...

Here is the scenario:


I have 2 webapps deployed under "/" context on Tomcat using vhosts

When I access


http://webapp1.domain.ext:8080/ I get webapp1

http://webapp2.domain.ext:8080/ I get webapp2


and also a static site on Apache




Everything works cool on Tomcat end (using META-INF/context.xml and <Host>

Now I want to use Apache+mod_jk which runs on port 80 and which has several
static websites...

How do I use JkMount to moutn both webapps? 




JkMount /      node1

JkMount /*     node1


Will not work...



My goal is to access both static sites and webapps via virtual hosts where
webapps are deployed under "/" (root) context..

I am not using any loadbalancers or similar..


Here is my tomcat.conf


LoadModule jk_module modules/

JkWorkersFile conf.d/

JkLogFile logs/tomcat-mod-jk_log

JkLogLevel info

JkLogStampFormat  "[%a %b %d %H:%M:%S %Y]"

JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

JkRequestLogFormat "%w %V %T"


# Mount your applications

# this is not working for the static sites....


JkMount /   node1

JkMount /* node1


JkShmFile run/jk.shm


# Add jkstatus for managing runtime data

<Location /jkstatus/>

   JkMount status

   Order deny,allow

   Deny from all

   Allow from





And my




Define list of workers that will be used

# for mapping requests



# Define Node1




#local_worker should be commented out to enable load-balancing. Otherwise,
only fail-over is available.




# Define Node2




#local_worker should be commented out to enable load-balancing. Otherwise,
only fail-over is available.




# Load-balancing behaviour


#worker.loadbalancer.balanced_workers=node1, node2





# Status worker for managing load balancer




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message