You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jiansen Niu <ao...@gmail.com> on 2010/03/23 15:27:07 UTC

Re: Is it possible to set the port for tomcat manager to 8080 and root port 80???

While you can not define two listening ports for one Tomcat instance, you
can put a Apache web server in front of your Tomcat, and define virtual
hosts for all applications hosted by your Tomcat except Manager app.

Jiansen

2010/3/23 Søren Blidorf <so...@nolas.dk>

> Is it possible to set the port for tomcat manager to 8080 and root port
> 80???
>
>
>
> Soren, DK
>
>
>
>

RE: Is it possible to set the port for tomcat manager to 8080 and root port 80???

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jiansen Niu [mailto:aoeshang@gmail.com]
> Subject: Re: Is it possible to set the port for tomcat manager to 8080
> and root port 80???
> 
> While you can not define two listening ports for one Tomcat instance,

Of course you can - you can define as many as you want via multiple <Connector> elements.  Please don't propagate misinformation.

> you can put a Apache web server in front of your Tomcat

Now that would be massive overkill.

Much easier to define the two <Connector> elements in Tomcat, and then use the RemoteAddrValve to control what is visible to each port:
http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Remote%20Address%20Filter

However, the idea of separation by port is pretty much non-sensical.  Virtual hosting would make slightly more sense:
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

Regardless of the ports or virtual hosts, you must use the appropriate security mechanisms to keep unwanted users from accessing the manager app.  

 - 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


AW: Is it possible to set the port for tomcat manager to 8080 and root port 80???

Posted by Steffen Heil <li...@steffen-heil.de>.
> > That's another discussion, but it could really make sense, if you use a
> > connector bound to a non-public interface (or even localhost) just for
> > administration.
> Which is what the RemoteAddrValve is for.

Yes, I know.
Still some people might prefer complete separation (instead of hiding) and
even might see an advantage to have something else mounted on the same path
from the outside.

But let's stop this thread. It is as simple as:

The manager app cannot work with other hosts except the own.
(Which is usually fine, BTW)

Regards,
  Steffen


RE: Is it possible to set the port for tomcat manager to 8080 and root port 80???

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Steffen Heil [mailto:lists@steffen-heil.de]
> Subject: AW: Is it possible to set the port for tomcat manager to 8080
> and root port 80???
> 
> That's another discussion, but it could really make sense, if you use a
> connector bound to a non-public interface (or even localhost) just for
> administration.

Which is what the RemoteAddrValve is for.

 - 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: Is it possible to set the port for tomcat manager to 8080 and root port 80???

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/3/25 Steffen Heil <li...@steffen-heil.de>:
> Hi
>
>> As Pid pointed out, this doesn't work: the scope of the manager webapp is
> the <Host> it's deployed under.
>
> I didn't realize that part of his last line...
>
It will not see what applications are deployed under separate <Host>.
So, it will be effectively useless for you.


Best regards,
Konstantin Kolinko

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


AW: Is it possible to set the port for tomcat manager to 8080 and root port 80???

Posted by Steffen Heil <li...@steffen-heil.de>.
Hi

> As Pid pointed out, this doesn't work: the scope of the manager webapp is
the <Host> it's deployed under.

I didn't realize that part of his last line...


> The whole idea smacks of security through obscurity - which means you've
accomplished nothing.

That's another discussion, but it could really make sense, if you use a
connector bound to a non-public interface (or even localhost) just for
administration.


Regards,
  Steffen


RE: Is it possible to set the port for tomcat manager to 8080 and root port 80???

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Steffen Heil [mailto:lists@steffen-heil.de]
> Subject: AW: Is it possible to set the port for tomcat manager to 8080
> and root port 80???
> 
> Yes.
> 
> You need to define TWO <service /> nodes, each with its own 
> <connector /> (using different ports) an its own <engine />,
> each with its own <host />, one with the manager as <context />,
> one with the other web applications.

As Pid pointed out, this doesn't work: the scope of the manager webapp is the <Host> it's deployed under.  The whole idea smacks of security through obscurity - which means you've accomplished nothing.

 - 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


AW: Is it possible to set the port for tomcat manager to 8080 and root port 80???

Posted by Steffen Heil <li...@steffen-heil.de>.
Hi

> Is it possible to set the port for tomcat manager to 8080 and root port
> 80???

Yes.

You need to define TWO <service /> nodes, each with its own <connector />
(using different ports) an its own <engine />, each with its own <host />,
one with the manager as <context />, one with the other web applications.

However, I don't know precisely, how clean the manager is implemented and if
it can handle this scenario correctly.

I am not using the manager at all.


Regards
   Steffen


Re: Is it possible to set the port for tomcat manager to 8080 and root port 80???

Posted by Pid <pi...@pidster.com>.
On 23/03/2010 14:27, Jiansen Niu wrote:
> While you can not define two listening ports for one Tomcat instance,

Yes you can. Just add another Connector.

> you
> can put a Apache web server in front of your Tomcat, and define virtual
> hosts for all applications hosted by your Tomcat except Manager app.

Not sure how that helps TBH.

You might use HTTPD to enforce some rules about which apps are available 
on which port, but the above suggestion is somewhat confusing.

> 2010/3/23 Søren Blidorf<so...@nolas.dk>
>
>> Is it possible to set the port for tomcat manager to 8080 and root port
>> 80???


Connectors are defined above the Host/App level so it isn't possible to 
tie a specific Host or app to a specific Connector, without defining 
multiple Services.

That probably doesn't help you achieve your probable goal, because the 
manager app needs to be defined inside each Host where you want to use it.


p

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