Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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