Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Listening on multiple ips

David Erickson

2005-08-12


Hi I was just wondering what the best way to setup tomcat to listen to
multiple ip addresses is? I have a box with 1 nic that has 3 ip addresses,
the first address port 80 is in use by apache so I want it to listen on the
2nd and 3rd address. I also need to have different webapps be loaded for
each of the addresses it is listening on. From looking at the conf file I
was wondering if I can just create two connectors for each ip address ie:

  <Connector address="X.X.X.61" port="80"
         maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
         enableLookups="false" redirectPort="443" acceptCount="100"
         debug="0" connectionTimeout="20000"
         disableUploadTimeout="true" />

  <Connector address="X.X.X.62" port="80"
         maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
         enableLookups="false" redirectPort="443" acceptCount="100"
         debug="0" connectionTimeout="20000"
         disableUploadTimeout="true" />

And then in the engine create two Host elements:

   <Host name="X.X.X.61" debug="0" appBase="webapps-61"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">

   <Host name="X.X.X.62" debug="0" appBase="webapps-62"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">


Would this work?

Thanks,
David


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.