How to run Tomcat on Port 80
I've had people ask me how to run Tomcat on Port 80 before (as a non-root user). I've never had an answer until now. Today I found that Holger Klawitter has a solution using Kernel space port forwarding. I don't have a need to try this at the moment, but if someone is using it - please share your experiences.
As an FYI, Tomcat 5 will use commons-daemon making this much easier to do. Also, the first Beta of Tomcat 5 (5.0.9) has been released.
Posted by Garrett Smith on September 04, 2003 at 06:44 PM MDT #
Posted by Matt Raible on September 04, 2003 at 06:53 PM MDT #
Posted by Garrett Smith on September 04, 2003 at 07:00 PM MDT #
There is an easy option to redirect 8080->80 using xinetd, and of course using iptables (kernel space) is a standard technique. The latter is more efficient, no process required. A nice article can be found on dW.
Posted by Greg Klebus on September 04, 2003 at 08:55 PM MDT #
I have been using the iptables solution for quite a while and it works well. Beware however, since the REDIRECT target doesn't play nice with ip aliases. It redirects port 80 of *any* alias to port 8080 on the unaliased 'main' ip. I had to rewrite it like this for the original ip to be preserved :
<code>/sbin/iptables -t nat -I PREROUTING -p tcp -d w.x.y.z --dport 80 -j DNAT --to-destination w.x.y.z:8080</code>
Posted by Geert Bevin on September 05, 2003 at 06:03 AM MDT #
Posted by Remy Maucherat on September 06, 2003 at 05:09 PM MDT #
Posted by James on October 08, 2003 at 01:09 PM MDT #
Posted by Trejkaz Xaoza on November 10, 2003 at 12:06 AM MST #