You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Robert Lafleur <rl...@vbridges.com> on 2011/09/27 23:55:04 UTC

bind webapps to different IP addresses on a single instance of tomcat

I have a single instance of tomcat this is running two web applications. The
server hosting tomcat has IP addresses on two separate networks. I was able
to add address="<ip>" for the Connectors in server.xml, but this is a global
setting. Is there a way to configure a single instance of tomcat to bind
webapps to different ip addresses, or do I have to configure two tomcat
instance to host each webapp?

RE: bind webapps to different IP addresses on a single instance of tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Robert Lafleur [mailto:rlafleur@vbridges.com] 
> Subject: Re: bind webapps to different IP addresses on a single instance of tomcat

> Are these options available in Tomcat 6?

Yes, all of them are.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: bind webapps to different IP addresses on a single instance of tomcat

Posted by Robert Lafleur <rl...@vbridges.com>.
Are these options available in Tomcat 6? I apologize for not including this
earlier ...

Regards,

Robert Lafleur  •  Sr. Systems Engineer  •  rlafleur@vbridges.com
Office: 512.343.1100 x313 | Cell: 512.657.7283 | Fax: 512.343.1101



On Tue, Sep 27, 2011 at 5:11 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Robert Lafleur [mailto:rlafleur@vbridges.com]
> > Subject: bind webapps to different IP addresses on a single instance of
> tomcat
>
> > Is there a way to configure a single instance of tomcat
> > to bind webapps to different ip addresses, or do I have
> > to configure two tomcat instance to host each webapp?
>
> There are a few options in addition to running two instances of Tomcat.
>
> 1) Use virtual hosts to separate the requests; one <Host> per IP address.
> http://tomcat.apache.org/tomcat-7.0-doc/virtual-hosting-howto.html
>
> 2) Use a filter in each webapp to reject requests sent to the wrong IP
> address.  This one is fairly easier to configure:
> http://www.tuckey.org/urlrewrite/
>
> 3) Write a single <Valve> at the <Engine> level to reject inappropriate
> requests.  I don't think there's a standard Valve to do this, but it should
> be fairly easy to extend an existing one.
> http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
>
> 4) Configure two <Service> elements, each with one <Connector>, <Engine>,
> and <Host>.
> http://tomcat.apache.org/tomcat-7.0-doc/config/service.html
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: bind webapps to different IP addresses on a single instance of tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Robert Lafleur [mailto:rlafleur@vbridges.com] 
> Subject: bind webapps to different IP addresses on a single instance of tomcat

> Is there a way to configure a single instance of tomcat 
> to bind webapps to different ip addresses, or do I have
> to configure two tomcat instance to host each webapp?

There are a few options in addition to running two instances of Tomcat.

1) Use virtual hosts to separate the requests; one <Host> per IP address.
http://tomcat.apache.org/tomcat-7.0-doc/virtual-hosting-howto.html

2) Use a filter in each webapp to reject requests sent to the wrong IP address.  This one is fairly easier to configure:
http://www.tuckey.org/urlrewrite/

3) Write a single <Valve> at the <Engine> level to reject inappropriate requests.  I don't think there's a standard Valve to do this, but it should be fairly easy to extend an existing one.
http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html

4) Configure two <Service> elements, each with one <Connector>, <Engine>, and <Host>.
http://tomcat.apache.org/tomcat-7.0-doc/config/service.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org