1. Apache is a Web server, Tomcat is an application (Java) server, it is just a servlet container, is an Apache extension.
2. Apache and Tomcat can be run as standalone Web servers, but Apache cannot interpret Java programs (Jsp,serverlet).
3. Apache is an ordinary server, which itself only supports HTML as a normal Web page. However, PHP can be supported via plugins and can be connected to Tomcat (one-way Apache connection Tomcat, which means that Tomcat resources can be accessed through Apache.) otherwise)
4. Both are a kind of container, but publish something different: Apache is an HTML container, functions like IIS, Tomcat is a jsp/servlet container for publishing JSP and Java, similar to IBM Webshere, EBA WebLogic, Sun's jrun and so on.
5. Apache and Tomcat are independent and can be integrated on a single server.
An analogy: Apache is a truck that can hold something like HTML. But the water must be filled with containers (buckets), and Tomcat is a bucket (a water like Java), and the bucket can be kept out of the truck.
Apache only supports static Web pages, but dynamic Web pages like asp,php,cgi,jsp need to be handled by Tomcat.
Apache and Tomcat consolidated use: If the client is requesting a static page, only the Apache server responds to the request, or if the client requests a dynamic page, the Tomcat server responds to the request, because the JSP is the server-side interpretation code, This consolidation can reduce the service overhead of Tomcat.
What is the difference between Apache and Tomcat, and why integrate Apache and Tomcat?