You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jason Koeninger <jk...@jjcc.com> on 2001/06/16 23:29:27 UTC
Virtual Hosts
Let me see if I can take a different approach on these
questions. I've done a few different configurations for
virtual hosting and haven't been very pleased with
any of them. So, what I'd like to know is how people on
this list recommend you do virtual hosting. In our particular
situation, we have Apache 1.3.19 with mod_jk on one
system and Tomcat 3.3m3 on another. There are both
name-based virtual hosts and virtual hosts with unique
IP addresses on the same system.
I have several ideas I plan to try to fix some problems I've
run into, but I'd appreciate any recommendations from the
list before I waste a lot more time.
Just to let you know, I've tried using Tomcat's built in virtual
hosting and was reasonably successful if Tomcat was on the
same machine as Apache. However, IP address-based hosts
with my current configuration are exposing JSP code when the
IP address is used in the request. I've used mod_rewrite to rewrite
the URL, but I still have problems on clients that don't send the
HTTP 1.1 request that includes the host name.
Once upgraded to Tomcat 3.3m3, name-based hosting seems
to work fine in this setup, and any potential problems will likely be
worked out with mod_rewrite. However, some clients want an
IP. So, my next thought is to alias private IP addresses to the
Tomcat machine for each unique host and use different workers
for each host in the JkMount directives in the VirtualHost sections
of Apache's configuration. The down-side to that is in Tomcat 3.2,
I was having to include Host entries in server.xml for each unique
IP and each unique host name.
Anyway, if you have any recommendations, I'd love to hear them.
If I had the time, I'd just dig into the code and figure this stuff out, but
I don't have the time just yet.
Best Regards,
Jason Koeninger
J&J Computer Consulting
http://www.jjcc.com