Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
URL rewriting with front and back servers

If you ask someone to double a number, they'll come back to you and tell you twice the number you gave them - give the "3" and they'll say "6". But if you tell them to double the number every time they handle it, but refer it to someone else for them to validate it, you'll get "12" back. Since they will double it each time they pass it on. And if the person they validated it with also doubles it, you'll get "24".

If you're calling up a web page from a Tomcat Server that's running an application behind an Httpd server, you need to make sure that your URLs don't get rewritten two or three times in this fashion - but rather they get processed each step along the way in such a fashion that the report back to the browser is the correct one. Using httpd's mod_proxy it is especially easy to get the rewriting wrong, though.

The diagram here shows each of the three steps where URL re-writing may happen with mod_proxy:
1. On the way in through httpd, as set up by the ProxyPass directive
2. At Tomcat, as defined by the proxyName and proxyPort attributes of the <Connector>
3. On the way back through httpd, as per the ProxyPassReverse directive

My own suggestion is to KISS ("Keep is Simple, Stupid!"). Leave off proxyName and proxyPort attributes on the Tomcat Connector, and have the ProxyPass and ProxyPassReverse set to be equal but opposite.

(written 2008-12-14)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
A657 - Web Application Deployment - Using httpd to front Tomcat
  [576] Why run two different web servers - (2006-01-25)
  [631] Apache httpd to Tomcat - jk v proxy - (2006-03-03)
  [1377] Load Balancing with Apache mod_jk (httpd/Tomcat) - (2007-10-02)
  [1566] Strange behaviour of web directory requests without a trailing slash - (2008-03-06)
  [1939] mod_proxy_ajp and mod_proxy_balancer examples - (2008-12-13)
  [1944] Forwarding session and cookie requests from httpd to Tomcat - (2008-12-14)
  [2483] Clustering on Tomcat - (2009-10-30)
  [3018] Tuning Apache httpd and Tomcat to work well together - (2010-10-27)
  [3999] Handling failures / absences of your backend server nicely - (2013-02-08)

A655 - Web Application Deployment - Using Tomcat and Apache httpd Together
  [436] Linking Apache httpd to Apache Tomcat - (2005-09-05)
  [1376] Choosing between mod_proxy and mod_rewrite - (2007-10-02)
  [1383] Monitoring mod_jk and how it is load balancing - (2007-10-07)
  [1549] http, https and ajp - comparison and choice - (2008-02-22)
  [1552] Extra public classes in deploying Apache httpd and Tomcat - (2008-02-24)
  [1771] More HowTo diagrams - MySQL, Tomcat and Java - (2008-08-24)
  [1938] Predictive Load Balancing - PHP and / or Java - (2008-12-13)
  [2482] Load balancing with sticky sessions (httpd / Tomcat) - (2009-10-29)


Back to
mod_proxy_ajp and mod_proxy_balancer examples
Previous and next
or
Horse's mouth home
Forward to
Server - Service - Engine - Host, Tomcat
Some other Articles
Port and Glasses
Christmas scenes and events
Server - Service - Engine - Host, Tomcat
URL rewriting with front and back servers
Getting hold of the wrong end of the stick
Quick Summary - PHP installation
Summary of MySQL installation on a Linux system
4759 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, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 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).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2021: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/1940_URL ... rvers.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb