best practice for port stuff with Tomcat 4 on Linux?
Joined: Jul 15, 2003
I want to move to Tomcat 5 right now, but can't yet, and for the time being we need to move from Tomcat 4.1.23 on Windows to 4.1.31 on Red Hat, so I'm now facing a question of what to do about the port Tomcat runs on. I've read stuff online that suggests it's best to leave it at 8080 since 80 is a privileged port on *nix.
But from that point, I'm not sure what the best practice would be, though I've read different options, like user space port forwarding, kernal space port forwarding, or using using a port forwarder (portfwd or redir4a), none of which I'm familiar with. What do you Tomcat users suggest would be a good approach for someone who's only a beginner/intermediate with Linux and using standalone Tomcat? In case it matters, note that we are also moving from our single Windows web server to 2 Linux web servers (each running standalone Tomcat), and we're trying to configure a load balancer hardware appliance in front of the two web servers.
Thanks for your suggestions, Stephen
Joined: Sep 23, 2004
What is your concern about running as root, security? Yes, by default port numbers < 1024 are "privileged" ports. But Tomcat can run on port 80 just fine.
One alternative is to have Apache httpd in front of Tomcat. In this way Tomcat can run on whatever port you want and only Apache needs to run as root. Since httpd is used things like CGI, SSI, PHP, and others can be used in addition to the facilities of Tomcat.
<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.