How can I get TomCat to run on port 80? I'm not interested in having
apache serve static content, I just want Tomcat to serve everything.
So I'm not too interested in mod_jk to hook Apache up with tomcat.
Thanks
Owen Jacobson - 22 Oct 2007 21:56 GMT
> How can I get TomCat to run on port 80? I'm not interested in having
> apache serve static content, I just want Tomcat to serve everything.
> So I'm not too interested in mod_jk to hook Apache up with tomcat.
>
> Thanks
Since Java provides no mechanism for altering the OS user the JVM is
running as, running Tomcat on port 80 involves allowing Tomcat to run
as root. Apache gets around this by binding to 80 as root and then
dropping to a non-privileged account based on the contents of
httpd.conf.
Running Tomcat as root should give you pause, at the very least.
Dundonald - 22 Oct 2007 22:25 GMT
> > How can I get TomCat to run on port 80? I'm not interested in having
> > apache serve static content, I just want Tomcat to serve everything.
[quoted text clipped - 9 lines]
>
> Running Tomcat as root should give you pause, at the very least.
Yes it does if it means having to run as root. But that sucks! :(
Eric Sosman - 22 Oct 2007 23:16 GMT
Dundonald wrote On 10/22/07 17:25,:
>>>How can I get TomCat to run on port 80? I'm not interested in having
>>>apache serve static content, I just want Tomcat to serve everything.
[quoted text clipped - 11 lines]
>
> Yes it does if it means having to run as root. But that sucks! :(
If you're running Solaris 10, you can use a non-root
account by granting it the PRIV_NET_PRIVADDR privilege.
This allows processes running under that account to bind
low-numbered ports without allowing them to do other
rootly things. "man -s5 privileges" (if applicable).

Signature
Eric.Sosman@sun.com
Arne Vajhøj - 22 Oct 2007 23:37 GMT
> Since Java provides no mechanism for altering the OS user the JVM is
> running as, running Tomcat on port 80 involves allowing Tomcat to run
> as root. Apache gets around this by binding to 80 as root and then
> dropping to a non-privileged account based on the contents of
> httpd.conf.
Not all OS's have "root" and not all OS's have the <port 1024 rule.
Arne
Arne Vajhøj - 22 Oct 2007 23:36 GMT
> How can I get TomCat to run on port 80? I'm not interested in having
> apache serve static content, I just want Tomcat to serve everything.
> So I'm not too interested in mod_jk to hook Apache up with tomcat.
Edit server.xml and change port 8080 to 80 ...
Arne
Ed Webb - 22 Oct 2007 23:46 GMT
> How can I get TomCat to run on port 80? I'm not interested in having
> apache serve static content, I just want Tomcat to serve everything.
> So I'm not too interested in mod_jk to hook Apache up with tomcat.
>
> Thanks
If you're using iptables you can create a rule to redirect port 80
traffic to port 8080.
Ed!
Zsolt Koppany - 23 Oct 2007 09:56 GMT
Dundonald,
it is always the best to install apache und using tomcat via connector.
Alternatively you can use iptable.
Zsolt
> How can I get TomCat to run on port 80? I'm not interested in having
> apache serve static content, I just want Tomcat to serve everything.
> So I'm not too interested in mod_jk to hook Apache up with tomcat.
>
> Thanks
Daniel Pitts - 23 Oct 2007 17:31 GMT
> Dundonald,
>
[quoted text clipped - 8 lines]
>>
>> Thanks
I would assume that Tomcat has a configuration file where you can set
the port. I only use Resin, so I don't know for sure. you might do a
grep on all the config files for 8080 (I assume thats the default Tomcat
port).
Good Luck,
Daniel.
--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
Lew - 23 Oct 2007 22:30 GMT
"Dundonald" schrieb ...
>>> How can I get TomCat to run on port 80? I'm not interested in having
>>> apache serve static content, I just want Tomcat to serve everything.
>>> So I'm not too interested in mod_jk to hook Apache up with tomcat.
> I would assume that Tomcat has a configuration file where you can set
> the port. I only use Resin, so I don't know for sure. you might do a
> grep on all the config files for 8080 (I assume thats the default Tomcat
> port).
Arne Vajhøj wrote:
>> Edit server.xml and change port 8080 to 80 ...

Signature
Lew
Arne Vajhøj - 25 Oct 2007 03:12 GMT
> it is always the best to install apache und using tomcat via connector.
> Alternatively you can use iptable.
There are some cases where that is a good idea. But I would say that
there are also cases where it is just a completely unnecessary
complexity.
Arne