Training, Open Source computer languages

PerlPythonMySQLTclRubyC & C++LuaJavaTomcatPHPhttpdLinux

Search our site for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Apache httpd and Apache Tomcat together tips

Many sites run two web servers - Apache httpd is ideal for plain HTML documents and scripts / programs that are single pages, run rarely, not all linked in together. Whereas Tomcat is an application container that suits applications that are run by tens of people all at the same time - great for banking, student record handling systems, big document and data portals ....

Do you choose one or the other? Not usually - you can run them both and then connect them - see the connector story for details.

During the last course I gave before Christmas, we connected the two servers using mod_proxy, using mod_jk, and even using mod_rewrite to share out the Tomcat load between multiple Tomcat servers. Links - description and link to sample configuration files.

Here's a handful of extra tips.

1. Why not point both httpd AND Tomcat's Document Root at the same directory? That way, you can keep your application in one place and configure your connector to forward ONLY servlets and .jsp-s. The result is an application that's easy to maintain, but at the same time is efficiently using the most efficient server for each element.

2. In early testing and at time you've been reconfiguring, it's worth turning your Tomcat off to test the httpd element rather than starting your tests with everything switched on. The uncommon httpd response codes that you'll get tell you heaps about what's going on.
502 - Bad Gateway. httpd is trying to forward to an non-running Tomcat
503 - Application not available. httpd has forwarded to Tomact, but Tomcat can't provide the application - typically it's not running.
500 - Internal server error. Your httpd forwarding isn't configured right?

3. When doing a fresh restart of Tomcat with a major upgrade of applications, or after a series of tests that have generated a confusing array of intermediate files that could get carried over to the live application, you can delete the work and temp subdirectories in Tomcat. But, please, only do this when Tomcat is stopped!
(written 2006-12-24 08:43:10)

 
Associated topics are indexed under
A653 - Web Application Deployment - Tomcat - Configuring Web Applications
A900 - Web Application Deployment - Tomcat - Extra Features

Back to
Stirling at night
Previous and next
or
Horse's mouth home
Forward to
Friends and family
Some other Articles
Dates, times, clickable diarys in PHP
Passing GET parameters through Apache mod_rewrite
Date conversion - PHP
Friends and family
Apache httpd and Apache Tomcat together tips
Stirling at night
Old dog, old tricks
Room at the Inn, Guy at the station
Meet the neighbours
.pdf files - upload via PHP, store in MySQL, retrieve
1916 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

© WELL HOUSE CONSULTANTS LTD., 2008: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 0800 043 8225 or 01225 708225 • FAX: 0845 8382 405 or 01225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho