1

I have a website using PhP and Apache Webserver (e.g. mod_php). I need to use Tomcat for another purpose. Rather than just add Tomcat to the current mix, I'm wondering if I should eliminate Apache Webserver and simply use Tomcat to serve static webpages assuming I can get PhP onto Tomcat somehow.

My PhP usage on the website is very very small.

Can PhP be installed into Tomcat such that Apache Webserver can be removed? If so, if this a good practical solution? Or, will performance across the board suffer in Tomcat by doing so? Am I splitting hairs by worrying about trying to simplify the number of software pieces installed, or would it be worth it to do so? Looking for some conventional wisdom.

If PhP is added to Tomcat, would I need to reach into the PhP code and modify anything there to get things working now that Apache Webserver is out of the picture, or would it be plug-and-play (no modification required)?

gkdsp
  • 582
  • 1
  • 6
  • 19

1 Answers1

4

You can, but only with PHP 4.

Also, it is generally a good idea to have an Apache server in front of a Tomcat server, and there are several reasons for that, see more on this link: http://wiki.apache.org/tomcat/FAQ/Connectors#Q3

Frands Hansen
  • 4,657
  • 1
  • 17
  • 29
  • OK, great fbh, sounds like the mainstream thing to do is use Apache webserver in conjunction with Tomcat. I don't want to go off on any weird tangents. Thanks – gkdsp Jan 27 '12 at 22:20