tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: newbie: multiple ports for same tomcat server 5.0
Date Fri, 22 Jan 2010 19:00:57 GMT
Hash: SHA1


On 1/21/2010 1:53 PM, Chart wrote:
> There is a SSI server on the outside that sends request to
> 8009 for this tomcat server (from what I have been told). The tomcat
> server is running on port 8082.

You mean that Tomcat is accepting requests on port 8082. What kind of
requests, HTTP?

> I have been tasked to change this tomcat
> server to accept request from 8082 when they are coming from the outside and
> port 80 if you are inside the network.

If Tomcat is already listening to port 8082, then it will continue to do
so. There should be no need to change anything, unless you have
instructed Tomcat to listen only on a certain interface (like localhost).

> The outisde goes from an address
> that accepts the request on port 80 and then sends it to tomcat on port
> 8082.

Okay, this sounds like your setup already does exactly what your
requirements state. Congratulations: you're done!

> The inside I would set DHCP to send directly to the tomcat server
> and by pass the SSI server.

Uh, wait... what?

> Therefore I need to allow this tomcat server
> to listen on port 80 and port 8082.

Where is the SSI server? Same machine, or someplace else? Is it okay if
remote users go directly to port 80 on the Tomcat machine, or do you
need to prohibit them from doing so?

>     <Connector ... port="8082" ...

This accepts HTTP requests on port 8082, and listens on interface
"" which means it will respond to requests from anywhere.

>     <Connector ... port="8009" protocol="AJP/1.3" ...

This accepts AJP requests on port 8009, and listens on interface
"" which means it will respond to requests from anywhere.

If all you want to do is add another port number, that's easy in theory
(as Andre' pointed out):

    <Connector URIEncoding="UTF-8" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" port="80"
redirectPort="8443" maxSpareThreads="75" maxThreads="150"

That's your original HTTP <Connector> with just the port number changed.

Now, if your SSI server (btw: never heard that term before) is running
on the local machine and already listening to port 80, then you'll have
to do as Chuck suggests and have Tomcat bind to localhost (or some other
interface) as to avoid conflicts with the aforementioned server who
already owns port 80.

Also, if you're running on *NIX, port 80 is considered "privileged" and
you therefore must make arrangements to be able to bind to that port. If
this is the case, please let us know and we can help you do that.

If you ever move up to 5.5 or (even better) 6.0, you might want to
consider using an <Executor> that allows all your <Connector>s to share
a single thread pool. That way, you won't run the risk of having lots of
threads sitting around doing nothing because one of the <Connectors> is

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message