tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: [OT: Apache] Re: Virtual Hosting with Apache and mod_jk
Date Wed, 02 Aug 2006 22:37:54 GMT

> However, I do not see anything regarding mod_jk in the txt. When
> setting up multiple instances, do I need to have mod_jk on different
> ports? Do I need to specify different Connector elements in the
> different server.xml files? Each one pointing to a different port?

You'll need more than one worker defined in Each
worker needs a separate target port, and each of your Tomcat instances
will need a different
ajp port to listen to.

I typically like an arrangement like this:
workers.list=worker1, worker2, worker3, etc.

(those are all 8x85 because it's nice to offer Apache access through
8x80, sometimes. it's just historical for me at this point)


Listen 8180
<VirtualHost *:8180>
    JkMount whatever worker1

Listen 8280
<VirtualHost *:8280>
    JkMount whatever worker2


You are free to provide everything using the same apache port (like 8888
or 8080 or 8180 or whatever). I typically offer everything through 8180
for my test apps, and regular old port 80 for production. If you want,
you can split everything up into separate apache ports (as shown above)
or merge them together into a single virtual host running on a single
port. Each app you map to Tomcat can live inside the same VirtualHost,
even if they are going to separate Tomcat instances.

Apache + mod_jk gives you a /ton/ of flexibility.


View raw message