Main Content

Apache, Tomcat, mod_proxy

Archive - Originally posted on "The Horse's Mouth" - 2009-08-06 07:56:59 - Graham Ellis

The Apache httpd web server (a.k.a. "The Apache Server") is essentially a file (web page) server, written for fast performance in C, very reliable, and VERY widely used.

The Apache Tomcat web server (a.k.a. "Tomcat") is essentially a web application container that runs using web protocols. It's written in Java, works well, and is quite widely used as a backend server.

The Apache httpd server is ideal for site with lots of individual files to serve from time to time. The Apache Tomcat server is great for sites with large number of accesses to a handful of scripts. But of course, most real life web sites require a bit of one and some of the other. So in most cases that you'll find a Tomcat, you'll also find an Httpd in front of it, taking all the requests to the domain and passing on (via Apache mod_proxy or mod_jk to Tomcat these days) requests for the major application.

There's an example of an Apache httpd configuration file here that connects Apache httpd to Apache Tomcat via mod_proxy (also includes mod_jk and mod_rewrite examples), and a more complex example using virtual hosts (several domains server by the same server) here.

Our Apache httpd and Tomcat course covers mod_proxy, and (briefly) the additional mod_proxy_balancer which allows a single Apache httpd to pass on requests to several Tomcats (or actually to more httpds or other servers) to do the bulk of the processing. Apache Httpd and Apache Tomcat are two very flexible web server which - when used in combination - provide the platform on which you can run a wide range of sites / applications, and we'll teach you how to make the best of setting up and managing both servers, and linking them together.