Hi

I'm new to the list, so... hi!  :-)

Here's our scenario: We use Squid as a reverse proxy cache in front of
Apache which in return calls Tomcat for dynamic content:

Browser  --> Squid  -->  Apache  -->  Tomcat

Until now we used the old mod_webapp, but now we're changing to mod_jk2
(with Apache 1.3 and Tomcat 4.1). We need to have several hosts on the same
Apache and thus use virtual hosts. The problem is that the web applications
sometimes need to have the same name.

An example:

www.abc.com has two web applications, one for each language (ISO codes):
www.abc.com/eng/ and www.abc.com/fre/  (French)
www.def.com also has two web applications which are different, but have the
same name: www.def.com/eng/ and www.def.com/fre/

Now, with the old mod_webapp, all we had to do is define a unique name for
each of those (we chose a three-letter acronmy of the site plus the web
application name), in this case "abc_eng", "abc_fre", "def_eng" and
"def_fre" and point to them in the virtual host definition of Apache, like
this:
<VirtualHost ....>
        ServerName www.abc.com
        DocumentRoot ....
        WebAppDeploy  abc_eng /eng
        WebAppDeploy  abc_fre /fre
</VirtualHost>
<VirtualHost ....>
        ServerName www.def.com
        DocumentRoot ....
        WebAppDeploy  def_eng /eng
        WebAppDeploy  def_fre /fre
</VirtualHost>

As far as I can see, with mod_jk2, this is not possible in Apache alone. Am
I right?

I read on a couple of pages how Tomcat can be configured for virtual
hosting, but I think these examples were all assuming that you use Tomcat as
the web server. From what I understand I would need to define something like
this in server.xml:
<Host name="www.abc.com" debug="0" appBase="webapps" unpackWARs="true">
        <Context path="/eng" docBase="abc_eng" debug="0" reloadable="true"/>
        <Context path="/fre" docBase="abc_fre" debug="0" reloadable="true"/>
</Host>
<Host name="www.def.com" debug="0" appBase="webapps" unpackWARs="true">
        <Context path="/eng" docBase="def_eng" debug="0" reloadable="true"/>
        <Context path="/fre" docBase="def_fre" debug="0" reloadable="true"/>
</Host>

Another problem which may arise is that the domain names point to Squid,
thus Apache only responds to the IP address. Frankly, I don't know exactly
how Apache does the DNS lookup, and I know there's a parameter in the
server.xml that enables DNS lookups. Surely, this is necessary for this
scenario to work?

Anyway, in a nutshell: Has anybody ever done this? Will this work?

Any help is greatly appreciated!

Thanks & best regards,
Eric 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to