| |||||||||||
Httpd to Tomcat, Proxy, code 302 problems Posted by admin (Graham Ellis), 15 August 2004 Scenario (an issue that came up during last week's course on one of the systems and I "could see for looking")* Apache httpd running on port 80 of a server called "Thursday" * Apache tomcat also runninng on "Thurdays" * Requests to the /shop directory on httpd to be forwarded to the /cycleshop webapp on Tomcat via Proxy port 7476 * All worked fine for requests /shop/ (note trailing /) and anything withing /shop, but failed for /shop with no trailing /. Configuration file - pertinent information: httpd.conf includes Code:
server.xml includes Code:
Analysis. Requests for directories without a trailing / result in an http code 302 (moved temporarily) being returned, and the bowser then looks up the returned location. Here's this demonstrated with telnet: Code:
The proxyPort attribute in the coyote connector configuration rewrites the response as if the request was on port 80, so that the httpd does NOT use its ProxyPassReverse as the URL does not match. By REMOVING the proxyPort setting from server.xml, the response for the request for the directory /shop now reads: Code:
which is a correctly rewritten URL both forwards and backwards. When the Browser requests the file at the location to which it has been moved, this operation is now correct. This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |