tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Berry" <>
Subject Re: [OT: Apache] Re: Virtual Hosting with Apache and mod_jk
Date Wed, 02 Aug 2006 19:48:57 GMT
Hi Chris,
On 8/2/06, Christopher Schultz <> wrote:
> Eric,
> >        /*.jsp ajp13
> >        /*.do ajp13
> I assume these lines say "JkMount" before the paths...?

This is correct, sorry (bad rectangular copy).

> Are you using "name based virtual hosting" -- meaning that the hostname
> chooses the VirtualHost? Or, do you have multiple IP addresses pointing
> to the same server, and you are using IP address to choose the virtual host.
> If you are using "name based virtual hosting", then the ServerName head
> is /required/ to make it work: you cannot get it to work using just the
> IP address.

I'm using name based virtual hosting and found a solution to my first
problem by putting a VirtualHost in where the ServerName is the IP
address of the machine, and pointing the DocumentRoot to the manual
<VirtualHost *:80>
        DocumentRoot /opt/apps/apache2/manual
(This works for me, since I'll only be accessing it through the local network)

> Generally, this is done with separate VirtualHost entries in httpd.conf,
> with a separate set of JkMount directives in each one: the configuration
> is handled entirely in Apache, so you don't have to do anything weird in
> your Tomcat configuration (as long as your <Engine>'s "defaultHost" is
> set to the same value as your simple <Host> entry).
> You do not need to use mod_rewrite to do this.
> If you are going to be running separate applications for each
> VirtualHost, I recommend running them in different instances of Tomcat.
> This will allow you to administer them separately. Also, if you have to
> take one of them offline (or one of them dies unexpectedly), the others
> are not interrupted.

I wanted to use mod_rewrite to avoid having to edit the httpd.conf and
server.xml files whenever I wanted to add another host, but since
there won't be more than 3 or 4, this will be fine. :)

Thank you for the advice regarding multiple instances of Tomcat, this
is a great idea and I will read the documentation on it, but if there
are any pointers anyone has they'd be greatly appreciated.

One last question, I recently tried to use Apache 2.2.3, and found
that mod_jk wouldn't compile against it, has anyone had similar
issues? I'm happy with Apache 2.0, but thought I'd ask.

Thanks again,

Learn from the past. Live in the present. Plan for the future.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message