I’ve seen a lot of machines running both Apache with mod_jk just to redirect ports to Jboss/Tomcat or another Java application server. As most of the Java AS have a built in HTTP server and can “talk” with that protocol, I can just let them run on the web (80) port and save me the extra configuration and memory Apache needs.
While this solution works fine, we should bear some things in mind:
- This solution requires running the Java AS as root, otherwise it can’t use a port lower than 1024. Running as root have some security implications.
- This means we can’t run regular websites on the server, as everything is handled by the Java AS.
- We can’t use Apache to load balance the Java AS (if we have more than one)
- We can’t run several Java AS on the same machine.
- We usually keeps the control on the AS for the system administrator, while running the AS as a separate user lets us pass the control to someone else.
So after seeing all the disadvanteges of not using Apache and mod_kl, I decided it worth the extra configuration and memory (: