tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john-paul delaney>
Subject Re: I'm stuck. Apache-tom4.0 virtual hosts
Date Thu, 07 Feb 2002 23:03:30 GMT

I'm a newbie with this but here's what I got...

The jakarta documentation says the Host element represents a Virtual Host.  One or more Host
elements are nested inside an Engine element.

..and on an Engine element it says, Exactly one Engine element must be nested inside a Service
element, following all of the corresponding Connector elements associated with a Service.

..and on a Connector it says, HTTP/1.1 and Warp are typical connectors.

So in the server.xml file, I used the Tomcat-Apache Service, and placed some Warp Connectors
(making sure they utilized unique ports), one for each one of my virtual hosts within the
service as follows:

  <!-- Define an Apache-Connector Service -->
  <Service name="Tomcat-Apache">

    <Connector className="org.apache.catalina.connector.warp.WarpConnector"
     port="8008" minProcessors="5" maxProcessors="75"
     acceptCount="10" debug="0"/>

    <Connector className="org.apache.catalina.connector.warp.WarpConnector"
     port="8015" minProcessors="5" maxProcessors="75"
     acceptCount="10" debug="0"/>

    <!-- Replace "localhost" with what your Apache "ServerName" is set to -->
    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
     name="" debug="99" appBase="webapps">

Then I added in my Hosts (Default Host as in server.xml and others for each virtual host).

It was only when I used this configuration that the entries in httpd.conf were accepted and
responded ok.  Example from httpd.conf follows:

    ServerAdmin ...
    DirectoryIndex index.html
    DocumentRoot ...
    WebAppConnection apoWarpConn  warp
    WebAppDeploy   myapp       apoWarpConn    /apps/
    WebAppDeploy   manager      apoWarpConn   /manager/

    ErrorLog ...
    CustomLog ...

At this point, I even removed the Tomcat-Standalone Connector Service from server.xml and
all seems to be responding as I want.

Nevertheless beware... this outcome is more the result of trial & error than a logical
understanding of the components on my part.


On Thu, 7 Feb 2002, chad kellerman wrote:

> Hey guys,
>     I am stuck again.  This time with the virtual host section in apache.  Here is what
I got:
>  <VirtualHost>
> WebAppConnection warpConnection warp localhost:8008
> WebAppDeploy examples warpConnection /home/jak/jakarta-www/examples/
> User jak
> Group jakartagrp
> ServerName
> ServerAdmin
> DocumentRoot /home/jak/jakarta-www
> TransferLog /home/jak/jakarta-logs/access-log
> ScriptAlias /cgi-bin/ /home/jak/jakarta-www/cgi-bin/
> </VirtualHost>
> an /etc/httpd/bin/apachectl configtest says it does not like
> WebAppDeploy examples warpConnection /home/jak/jakarta-www/examples/
>       I am trying to get tomcat working with multiple virtual hosts.
> I have the module loading fine.  But I haven't found how to configure httpd.conf for
tomcat as well as the server.xml file.
>      Anyone get this working properly?  I on red hat.  But I would think the config should
be similar on other os's..
> Thanks for the info,
> Chad
> --
> To unsubscribe:   <>
> For additional commands: <>
> Troubles with the list: <>


To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message