I have one Java- and one PHP-application which I both want to run on the same machine (using Tomcat).
As far as I can see, I have two options:
- Option 1: Do the classic apache-tomcat setup with mod_jk and let apache handle the php requests and forward all requests to the Java application to tomcat.
- Option 2: Use only tomcat by installing php on it. So, no extra apache server for handling php.
I don't have much experience with this, so I wondered which option would be the wise one, since I cannot foresee which problems might occur.
I, personally, prefer option 2 because I'd then have to manage just one server instead of two. However, I have a bad feeling about this since most people out there seem to prefer option 1.
Which option should I pick?
Important: I need SSL support available for both (php and java) applications. As far as I know, creating the CSR file for buying a SSL certificate differs between apache and tomcat (openssl vs. keytool). Since I don't want to purchase two certificates, this has to be kept in mind.