tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Isaacs <>
Subject RE: mod_jk and URL mapping problem?
Date Wed, 05 Sep 2001 12:54:25 GMT
Hi Paul,

I assume you are using a version of Tomcat 3.2.x.
If you are willing to give Tomcat 3.3 a try, Tomcat 3.3b2
has support for virtual host aliases. The syntax is:

    <host name="" address="" >
        <alias name="" />
        <alias name="" />
        <alias name="" />
        <alias name="" />
        <Context path="" docBase="/home/user/public_html"

You do not need to put this in your server.xml.  Put it in a
file whose name begins with "apps-" and has an ".xml" extension,
such as "apps-vhosts.xml".

Starting with 3.3b2, you must start Tomcat with a "jkconf"
option to have the auto-generated config files written.
This will initialize Tomcat, write the config files, and
exit.  This may be done while Tomcat is already running as
as server.  This change deals with the issue of having Tomcat
and Apache as services, and Tomcat rewriting the config file
while Apache tries to read it.

There are numerous other improvements, many of which are
documented in the updated tomcat-ug.html. An on-line
version is at:


Unfortunately the mod_jk-howto.html has not yet been updated
with information about this feature.


> -----Original Message-----
> From: Paul Downs []
> Sent: Wednesday, September 05, 2001 8:06 AM
> To: Tomcat Mailing List
> Subject: mod_jk and URL mapping problem?
> Hi,
>   Greetings all, first post to this list from a Tomcat 
> newbie(ish).  I have 
> been setting up tomcat, using mod_jk on Linux, on quite a few 
> machines and 
> have this problem:
>    Each virtual host has quite a few different domains in 
> ServerAliases 
> e.g.:
>         <VirtualHost>
>         DocumentRoot /home/user/public_html
>         ServerName
>         ServerAlias 
>         ErrorDocument 404 /404.html
>         ErrorDocument 403 /403.html
>         JkMount /*.jsp ajp13
>         JkMount /servlet/* ajp13
>         </VirtualHost>
>    And in server.xml I have this entry:
>         <Host name="">
>           <Context path="" docBase="/home/user/public_html" 
> debug="0"/>
>         </Host>
>    Amongst others....
>    My problem is that jsp/servlets is not parsed/accepted for 
> domains/urls 
> that are not mentioned in the Host entry.  I end up having to 
> have multiple 
> entries for each entry in ServerAlias'.  So the question is, 
> am I being 
> stupid?
>    The reason this is a bugbear is some jsp sites have loads 
> of entries in 
> ServerAlias and keeping track of them is awkward and makes 
> the config file 
> rather long!
> Thanks,  hope to be able to contribute some answers myself soon!
> Paul

View raw message