
Let's say that you want to set up a single web server to look after several domains, but then have parts of those domains served by other 'back room' servers. This diagram give you the picture - a single incoming IP address / server with all the security and logging stuff on it (and probably handing a lot of the general traffic too), but other machine(s) in the background fulfilling other specific roles. I set up a configuration like this yesterday - as part of an
httpd and Tomcat Deployment Course.
The main server is Apache httpd (I had it on 192.168.200.214 - see diagram) and it was serving a domain called "devizes". [technical note - devizes.wellho.net or something fully qualifies when you take this out to the internet!]. However, I wanted to add the domains "lavington" and "urchfont" to it, with parts of the Lavington domain forwarded to another server on the same machine, and the entire Urchfont domain forwarded to another machine - 192.168.200.215.
Using Apache 2.2.x, I uncommented the virtual host support line in httpd.conf, and configured the virtual host file in the extra directory ... using mod_proxy to forward my traffic. The Virtual host configuration file, with lots of extra annotation, is available
here.
Notice that is doesn't matter what the background servers are running (httpd, Tomcat or something else), or whether they're on the same physical box or a different one. And the whole scheme will easily expand to using balancing with mod_proxy_balancer ... all of which are the subject of other resources you'll find here abouts!
(written 2009-03-01 09:43:45)
Associated topics are indexed under
A608 - Web Application Deployment - Apache httpd mod_proxy [2482] Load balancing with sticky sessions (httpd / Tomcat) - (2009-10-29)
[2325] Apache, Tomcat, mod_proxy - (2009-08-06)
[2273] Three recent questions on Tomcat Convertors - (2009-07-07)
[1944] Forwarding session and cookie requests from httpd to Tomcat - (2008-12-14)
[1939] mod_proxy_ajp and mod_proxy_balancer examples - (2008-12-13)
[1767] mod_proxy and mod_proxy_ajp - httpd - (2008-08-22)
[1566] Strange behaviour of web directory requests without a trailing slash - (2008-03-06)
[1376] Choosing between mod_proxy and mod_rewrite - (2007-10-02)
[1121] Sharing the load with Apache httpd and perhaps Tomcat - (2007-03-29)
[1006] Apache httpd and Apache Tomcat together tips - (2006-12-24)
[934] Clustering, load balancing, mod_rewrite and mod_proxy - (2006-11-21)
[631] Apache httpd to Tomcat - jk v proxy - (2006-03-03)
Some other Articles
Melksham Industrial Static mirroring through HTTrack, wget and othersEast of Melksham CountrysideInternal Dummy Connections on Apache httpdVirtual hosting and mod_proxy forwarding of different domains (httpd)Tomcat 6 - Annotated Sample Configuration FilesDatabase connection Pooling, SSL, and command line deployment - httpd and TomcatSharing the load between servers - httpd and TomcatInvoker and cgi servlets on Tomcat 6Train and Coach fares from London (and airports) to Melksham