Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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.

http://adcasein.blogspot.com/2010/06/install-modjk-on-centos-55.html

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

 
discard

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.