0

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)

2 Answers 2

4

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.

2
  • 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, 2011 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. Jan 19, 2011 at 21:34
1

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

1
  • Perfect! (Running Tomcat as root is Just Wrong.) Jan 21, 2011 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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