Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm not an admin by choice and quite new to admin and admin policies. Now I know I need to bind tomcat to root somehow; at the moment I route all port 80 traffic to tomcat standard with iptables, but it seems the app cannot be accessed from some rented office sites, reason I was given was that they only allow outgoing comms on the standard ports from these sites and firewall admin refuses to budge. I have googled a fair few ways to resolve my question but I'm more confused than before I started searching as a lot of the pages are quite old. I am using a rented CentOS virtual server (5.4) with tomcat5.5 with java 1.6 (openjdk)

share|improve this question

Leave tomcat running as a non-privileged user, enable a JK connector, run apache on port 80 and use mod_jk to have it talk to tomcat.

This guy below wrote instructions for tomcat 6 but the same functionality is also available for tomcat 5.5. In fact, everything you need is available as a CentOS package, including mod_jk for apache.

Good luck.

share|improve this answer
thanks. I'll look into it and get back to you – Dark Star1 Jan 19 '11 at 10:15
Was told mod_jk was the old mod and to use mod_ajp instead. In any case I had it setup but I have a problem with plesk – Dark Star1 Jan 19 '11 at 20:29
@Dark Star1: that could be right - I'm not sure which one ships with CentOS 5 but they serve the same purpose. I can't help with plesk, sorry. – XCondE Jan 19 '11 at 21:34
up vote 1 down vote accepted

I just simply used the proxyPort and proxyName attribute of the tomcat connector and added forwarding rules to iptables. Works like a dream.

share|improve this answer
Perfect! (Running Tomcat as root is Just Wrong.) – reinierpost Jan 21 '11 at 1:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.