On Sun, 12 Aug 2001 21:59:19 -0400 (EDT), Jan Labanowski wrote:

>Again... Without knowing what you want to do, it is hard to advise.
>The <Host>....</Host> if for setting virtual hosts in Tomcat.

>You say, you want to connect Tomcat to Apache.
>Then you should do virtual hosts in Apache, not in Tomcat.

I would have to disagree on this point.  How successfully Tomcat 
does this in all situations is a different matter, but I think a lot of 
people want to do something like this:

<VirtualHost 10.0.0.1>

        ...
        JkMount /*.jsp ajp13
        ...

</VirtualHost>

<VirtualHost 10.0.0.2>

        ...
        JkMount /*.jsp ajp13
        ...

</VirtualHost>

In this case, Tomcat has to know about the virtual hosts to have two 
unique root contexts.  In fact, I've set up a system this way with the 3.2.3 
version, but I couldn't get the same thing to work when separating the 
Apache and Tomcat machines from each other.

IMHO,  Tomcat should be looking at the contents of the ServerName 
field on requests from Apache to determine what host to use in its own 
configuration.  Otherwise, you're stuck with running multiple instances of 
Tomcat like I am right now, or you're forced to run it on the same machine 
as Apache (and I have no idea why that works).

Note:  I did get this to work to an extent with machines separated, but it 
didn't reliably work under different forms of requests (HTTP 1.0 instead 
of 1.1 for IP-based hosts, IP instead of named-based hosts with the IP 
in the URL request instead of the name, and a few others that I forget).

Best Regards,

Jason Koeninger
J&J Computer Consulting
http://www.jjcc.com





Reply via email to