Tomcat and Apache webserver on same machine

apache-2.2tomcat

I need to install ODK Aggregate on my CentOS 6 Server which is already running Apache HTTP on both 80 and 443 (80 is redirecting to 443 to force secure connection).

I was reading ODK and it require Tomcat 6. I read here and on StackOverflow that this two don't run at the same time without tweaking some config.

I've never installed Tomcat. The server is running a production site so I can't take it offline to test (and I don't have other server to play with).

For the time being I don't mind running tomcat on 8080, 8888, 5000, etc.

I'm using ODK Collect on Android to fill a form and send it to an aggregate server. They recommend Google App Engine or amazon but I need to access the data from the PHP site. (Since ODK save the data to a mysql database I think I won't have any problems reading it back).

Best Answer

Running Apache and Tomcat on the same computer is no problem. It's pretty common to run Tomcat on port 8080, run Apache on port 80/443, and use mod_proxy to allow Apache to serve apps hosted by Tomcat.

You might set up Apache so that any requests going to /app on port 80 get proxied to localhost:8080/app, which is Tomcat, but the end user doesn't know or care about any of this.